Пример #1
0
        public void TestMessagePayloadJson()
        {
            var delegatePractice = new DelegatePractice();

            delegatePractice.SetPolicy(MessagePayloadReponsePolicies.JsonMessageResponsePayloadPolicy);

            var result = delegatePractice.ReponsePayload(new int[] { 1, 2, 3, 4 });

            Assert.IsTrue(result.Payload == "[1,2,3,4]");
        }
Пример #2
0
        public void TestMessagePayloadString()
        {
            var delegatePractice = new DelegatePractice();

            delegatePractice.SetPolicy(MessagePayloadReponsePolicies.StringMessageResponsePayloadPolicy);

            var result = delegatePractice.ReponsePayload(new int[] { 1, 2, 3, 4 });

            Assert.IsTrue(result.Payload == "{1:2:3:4}");
        }