Beispiel #1
0
        public void UnmarshallerUnknownVersion()
        {
            HotRodClientException ex = Assert.Throws <HotRodClientException>
                                           (delegate
            {
                marshaller.ObjectFromByteBuffer(new byte[] { 4 });
            });

            Assert.That(ex.Message, Is.EqualTo("Unknown compatibility serialization version: 4."));
        }
Beispiel #2
0
        public void UnmarshallerNonString()
        {
            HotRodClientException ex = Assert.Throws <HotRodClientException>
                                           (delegate
            {
                marshaller.ObjectFromByteBuffer(new byte[] { 3, 0xff });
            });

            Assert.That(ex.Message, Is.EqualTo("Cannot deserialize non-string (type 255)."));
        }
Beispiel #3
0
        public void MarshallerNonString()
        {
            HotRodClientException ex = Assert.Throws <HotRodClientException>
                                           (delegate
            {
                marshaller.ObjectToByteBuffer(12345);
            });

            Assert.That(ex.Message, Is.EqualTo("Cannot serialize non-string object: 12345."));
        }