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-4.5.1 test/unit/types/integer_type_test.rb
gotime-cassandra_object-4.5.0 test/unit/types/integer_type_test.rb
gotime-cassandra_object-4.4.5 test/unit/types/integer_type_test.rb
gotime-cassandra_object-4.4.4 test/unit/types/integer_type_test.rb
gotime-cassandra_object-4.4.3 test/unit/types/integer_type_test.rb
gotime-cassandra_object-4.4.0 test/unit/types/integer_type_test.rb
gotime-cassandra_object-4.3.2 test/unit/types/integer_type_test.rb
gotime-cassandra_object-4.3.1 test/unit/types/integer_type_test.rb
gotime-cassandra_object-4.3.0 test/unit/types/integer_type_test.rb
gotime-cassandra_object-4.2.2 test/unit/types/integer_type_test.rb
gotime-cassandra_object-4.2.0 test/unit/types/integer_type_test.rb
gotime-cassandra_object-4.1.0 test/unit/types/integer_type_test.rb
gotime-cassandra_object-4.0.2 test/unit/types/integer_type_test.rb
gotime-cassandra_object-4.0.1 test/unit/types/integer_type_test.rb
gotime-cassandra_object-4.0.0 test/unit/types/integer_type_test.rb
gotime-cassandra_object-3.0.5 test/unit/types/integer_type_test.rb
gotime-cassandra_object-3.0.4 test/unit/types/integer_type_test.rb
gotime-cassandra_object-3.0.3 test/unit/types/integer_type_test.rb
gotime-cassandra_object-3.0.2 test/unit/types/integer_type_test.rb
gotime-cassandra_object-3.0.1 test/unit/types/integer_type_test.rb