Sha256: 6d5fc56a61741ad686ed1555370abe1d9cb76371aed79d0ac555beb6d0aa415b

Contents?: true

Size: 764 Bytes

Versions: 28

Compression:

Stored size: 764 Bytes

Contents

require 'test/unit'
require File.join(File.dirname(__FILE__), '..', 'test_helper')

module TaliaCore
  class SourceTransferObjectTest < Test::Unit::TestCase
    def test_with_uri
      s = SourceTransferObject.new("#{N::LOCAL}Homer_Simpson")
      assert_equal('Homer Simpson', s.titleized)
      assert_equal('Homer_Simpson', s.id)
      assert_equal("#{N::LOCAL}Homer_Simpson", s.to_s)
      assert_equal("#{N::LOCAL}Homer_Simpson", s.uri.to_s)
      assert s.source?
    end
    
    def test_with_string
      s = SourceTransferObject.new('Homer Simpson')
      assert_equal('Homer Simpson', s.titleized)
      assert_equal('Homer Simpson', s.to_s)
      assert_equal('Homer Simpson', s.id)
      assert_nil(s.uri)
      assert_not s.source?
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
talia_core-0.7.0 test/talia_core/source_transfer_object_test.rb
talia_core-0.5.4 test/talia_core/source_transfer_object_test.rb
talia_core-0.5.3 test/talia_core/source_transfer_object_test.rb
talia_core-0.5.2 test/talia_core/source_transfer_object_test.rb
talia_core-0.5.1 test/talia_core/source_transfer_object_test.rb
talia_core-0.5.0 test/talia_core/source_transfer_object_test.rb
talia_core-0.4.22 test/talia_core/source_transfer_object_test.rb
talia_core-0.4.20 test/talia_core/source_transfer_object_test.rb
talia_core-0.4.19 test/talia_core/source_transfer_object_test.rb
talia_core-0.4.18 test/talia_core/source_transfer_object_test.rb
talia_core-0.4.17 test/talia_core/source_transfer_object_test.rb
talia_core-0.4.16 test/talia_core/source_transfer_object_test.rb
talia_core-0.4.15 test/talia_core/source_transfer_object_test.rb
talia_core-0.4.14 test/talia_core/source_transfer_object_test.rb
talia_core-0.4.13 test/talia_core/source_transfer_object_test.rb
talia_core-0.4.12 test/talia_core/source_transfer_object_test.rb
talia_core-0.4.11 test/talia_core/source_transfer_object_test.rb
talia_core-0.4.10 test/talia_core/source_transfer_object_test.rb
talia_core-0.4.9 test/talia_core/source_transfer_object_test.rb
talia_core-0.4.8 test/talia_core/source_transfer_object_test.rb