Ejemplo n.º 1
0
        public void CacheDoesNotInterfereBody()
        {
            var first = new FirstRequestModel {
                First = true
            };
            var firstParams = first.BuildBodyParams();

            var second = new SecondRequestModel {
                Second = false
            };
            var secondParams = second.BuildBodyParams();

            Assert.AreEqual("{\"first\":true}", firstParams.ToString(Formatting.None));
            Assert.AreEqual("{\"second\":false}", secondParams.ToString(Formatting.None));
        }
Ejemplo n.º 2
0
        public void CacheDoesNotInterfereQuery()
        {
            var first = new FirstRequestModel {
                First = true
            };
            var firstParams = first.BuildQueryParams();

            var second = new SecondRequestModel {
                Second = false
            };
            var secondParams = second.BuildQueryParams();

            Assert.AreEqual(1, firstParams.Keys.Count);
            Assert.AreEqual("true", firstParams["first"]);

            Assert.AreEqual(1, secondParams.Keys.Count);
            Assert.AreEqual("false", secondParams["second"]);
        }