Sha256: efb08d7b67f8462493268dd2ef58404d28511802dc0d12adda51ce0758ede4e7

Contents?: true

Size: 455 Bytes

Versions: 23

Compression:

Stored size: 455 Bytes

Contents

require 'test_helper'

class CassandraObject::Types::IntegerTypeTest < CassandraObject::Types::TestCase
  test 'encode' do
    assert_equal '3', coder.encode(3)
    assert_equal '-3', coder.encode(-3)

    assert_raise ArgumentError do
      coder.encode('xx')
    end
  end

  test 'decode' do
    assert_nil coder.decode('')
    assert_equal 0, coder.decode('abc')
    assert_equal 3, coder.decode('3')
    assert_equal -3, coder.decode('-3')
  end
end

Version data entries

23 entries across 23 versions & 2 rubygems

Version Path
gotime-cassandra_object-4.12.2 test/unit/types/integer_type_test.rb
gotime-cassandra_object-4.12.1 test/unit/types/integer_type_test.rb
gotime-cassandra_object-4.12.0 test/unit/types/integer_type_test.rb
gotime-cassandra_object-4.11.6 test/unit/types/integer_type_test.rb
gotime-cassandra_object-4.11.5 test/unit/types/integer_type_test.rb
gotime-cassandra_object-4.11.4 test/unit/types/integer_type_test.rb
gotime-cassandra_object-4.11.3 test/unit/types/integer_type_test.rb
gotime-cassandra_object-4.11.2 test/unit/types/integer_type_test.rb
gotime-cassandra_object-4.11.1 test/unit/types/integer_type_test.rb
gotime-cassandra_object-4.11.0 test/unit/types/integer_type_test.rb
gotime-cassandra_object-4.10.5 test/unit/types/integer_type_test.rb
gotime-cassandra_object-4.10.4 test/unit/types/integer_type_test.rb
gotime-cassandra_object-4.10.3 test/unit/types/integer_type_test.rb
gotime-cassandra_object-4.10.2 test/unit/types/integer_type_test.rb
gotime-cassandra_object-4.10.1 test/unit/types/integer_type_test.rb
cassandra_object_rails-0.0.1 test/unit/types/integer_type_test.rb
gotime-cassandra_object-4.10.0 test/unit/types/integer_type_test.rb
gotime-cassandra_object-4.9.2 test/unit/types/integer_type_test.rb
gotime-cassandra_object-4.9.1 test/unit/types/integer_type_test.rb
gotime-cassandra_object-4.9.0 test/unit/types/integer_type_test.rb