Sha256: a4438a8bb4195bc34627b239c4089df6ae1f2b7db6ef022963af7db31a97431e

Contents?: true

Size: 414 Bytes

Versions: 89

Compression:

Stored size: 414 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 3, coder.decode('3')
    assert_equal -3, coder.decode('-3')
  end
end

Version data entries

89 entries across 89 versions & 1 rubygems

Version Path
gotime-cassandra_object-2.10.9 test/unit/types/integer_type_test.rb
gotime-cassandra_object-2.10.8 test/unit/types/integer_type_test.rb
gotime-cassandra_object-2.10.7 test/unit/types/integer_type_test.rb
gotime-cassandra_object-2.10.6 test/unit/types/integer_type_test.rb
gotime-cassandra_object-2.10.5 test/unit/types/integer_type_test.rb
gotime-cassandra_object-2.10.4 test/unit/types/integer_type_test.rb
gotime-cassandra_object-2.10.3 test/unit/types/integer_type_test.rb
gotime-cassandra_object-2.10.2 test/unit/types/integer_type_test.rb
gotime-cassandra_object-2.10.1 test/unit/types/integer_type_test.rb
gotime-cassandra_object-2.10.0 test/unit/types/integer_type_test.rb
gotime-cassandra_object-2.9.2 test/unit/types/integer_type_test.rb
gotime-cassandra_object-2.9.1 test/unit/types/integer_type_test.rb
gotime-cassandra_object-2.9.0 test/unit/types/integer_type_test.rb
gotime-cassandra_object-2.8.6 test/unit/types/integer_type_test.rb
gotime-cassandra_object-2.8.5 test/unit/types/integer_type_test.rb
gotime-cassandra_object-2.8.4 test/types/integer_type_test.rb
gotime-cassandra_object-2.8.3 test/types/integer_type_test.rb
gotime-cassandra_object-2.8.2 test/types/integer_type_test.rb
gotime-cassandra_object-2.8.1 test/types/integer_type_test.rb
gotime-cassandra_object-2.8.0 test/types/integer_type_test.rb