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.")); }
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).")); }
public void MarshallerNonString() { HotRodClientException ex = Assert.Throws <HotRodClientException> (delegate { marshaller.ObjectToByteBuffer(12345); }); Assert.That(ex.Message, Is.EqualTo("Cannot serialize non-string object: 12345.")); }