예제 #1
0
        public void TestApiGzipSyncronous()
        {
            UnityAgent agent = new UnityAgent();
            string     url   = GetTestUrl("gzip");

            var response = agent
                           .Get(url)
                           .Begin()
                           .Result;

            Assert.AreEqual(HttpStatusCode.OK, response.StatusCode);
            Assert.That((bool)response.Json["gzipped"] == true);
        }
예제 #2
0
        public void TestApiGetSyncronous()
        {
            UnityAgent agent = new UnityAgent();
            string     url   = GetTestUrl("get");

            var response = agent
                           .Get(url)
                           .Begin()
                           .Result;


            Assert.AreEqual(HttpStatusCode.OK, response.StatusCode);
            StringAssert.AreEqualIgnoringCase((string)response.Json["url"], url);
        }