Пример #1
0
        public void WebFormatterUploadTest()
        {
            string data;

            privReadDataFromFile("../../StudentAggregate.txt", out data);
            string actual;
            string expected = "";

            WebFormatter.UploadJSONToURL(data, "http://apitest.sertifi.net/api/StudentAggregate", out actual);

            Assert.AreEqual(expected, actual);
        }
Пример #2
0
        public void WebFormatterUploadErrorTest()
        {
            string response;
            string nullData  = "";
            string nullData2 = " ";

            WebFormatter.UploadJSONToURL(null, null, out response);
            WebFormatter.UploadJSONToURL(null, "http://apitest.sertifi.net/api/StudentAggregate", out response);
            WebFormatter.UploadJSONToURL(nullData, "", out response);
            WebFormatter.UploadJSONToURL(nullData2, "", out response);
            WebFormatter.UploadJSONToURL(nullData, " ", out response);
            WebFormatter.UploadJSONToURL(nullData2, " ", out response);
        }