Sha256: 7f2c8e6f8fab70c3049e0b2b2760556398731bbe2ddce54541de8d1b42f3adb0

Contents?: true

Size: 1.13 KB

Versions: 3

Compression:

Stored size: 1.13 KB

Contents

require 'test/unit'
require 'cascading'

class TC_Cascading < Test::Unit::TestCase
  def test_fields_field
    result = fields(all_fields)
    assert result == all_fields
  end

  def test_fields_single
    declared = "Field1"

    result = fields(declared)

    assert result.size == 1

    assert_equal declared, result.get(0) 
  end

  def test_fields_multiple
    declared = ["Field1", "Field2", "Field3"]

    result = fields(declared)

    assert result.size == 3

    assert_equal declared[0], result.get(0)
    assert_equal declared[1], result.get(1)
    assert_equal declared[2], result.get(2) 
  end

  def test_tap
    tap = tap('/temp')
    assert_equal '/temp', tap.getPath().toString()
    assert tap.is_a? Java::CascadingTap::Hfs  

    tap = tap('/temp', :kind => :dfs)
    assert_equal '/temp', tap.getPath().toString()
    assert tap.is_a? Java::CascadingTap::Dfs

    tap = tap('/temp', :kind => :lfs)
    assert_equal '/temp', tap.getPath().toString()
    assert tap.is_a? Java::CascadingTap::Lfs

    tap = tap('/temp', :kind => :hfs)
    assert_equal '/temp', tap.getPath().toString()
    assert tap.is_a? Java::CascadingTap::Hfs
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cascading.jruby-0.0.6 test/test_cascading.rb
cascading.jruby-0.0.5 test/test_cascading.rb
cascading.jruby-0.0.4 test/test_cascading.rb