Exemplo n.º 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]");
        }
Exemplo n.º 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}");
        }