Example #1
0
        public void CassandraType_Cast()
        {
            // arrange
            var expected = new CassandraObject[] { (AsciiType)"string1", (LongType)300 };

            // act
            CompositeType   actualType = expected;
            CassandraObject actual     = actualType;

            // assert
            Assert.True(expected.SequenceEqual((CassandraObject[])actual));
        }
Example #2
0
        public void JavaBytes_To_CompositeType()
        {
            // arrange
            var expected = new CassandraObject[] { (BytesType)_compositeType[0].GetValue <string>(), (BytesType)_compositeType[1].GetValue <long>() };

            // act
            var actual = new CompositeType();

            actual.SetValueFromBigEndian(_javaByteOrder);

            // assert
            Assert.True(expected.SequenceEqual((CassandraObject[])actual));
        }
Example #3
0
        public void Implicit_ByteArray_Cast()
        {
            // arrange
            var expected = new CassandraObject[] { (AsciiType)"string1", (LongType)300 };

            byte[] bytes = GetBytes(expected);

            // act
            CompositeType actual = bytes;

            // assert
            Assert.True(expected.SequenceEqual(actual));
        }