Example #1
0
        public void PublishMessageTest()
        {
            var testMessage = new TestContract()
            {
                SomeData = "THEDATA"
            };

            _client.PublishMessage("somequeue", testMessage);
        }
Example #2
0
        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);
        }