public void PublishMessageTest() { var testMessage = new TestContract() { SomeData = "THEDATA" }; _client.PublishMessage("somequeue", testMessage); }
public void TestSerializeType() { var testContract = new TestContract() { SomeData = "THEDATA" }; var message = new OwMessageCommon("SomeContract"); var jsonMessage = JsonConvert.SerializeObject(message); var bytes = Encoding.UTF8.GetBytes(jsonMessage); var resultMsg = _seri.DeserializeTransferMessage(bytes, out var type, _dispatcher.TryGetByAlias) as TestContract; Assert.IsNotNull(resultMsg); Assert.AreEqual(testContract.SomeData, resultMsg.SomeData); }