Exemple #1
0
        public void GetSessionXML()
        {
            var        request = XmlRequest.Prepare("http://localhost:8080", "auth/session");
            WebMessage message = request.Get();

            Assert.AreEqual(HttpStatusCode.OK, message.Code);
        }
Exemple #2
0
        public void GetTestPageXML()
        {
            var        request = XmlRequest.Prepare("http://localhost:8080", "testpage");
            WebMessage message = request.Get();

            Assert.AreEqual(HttpStatusCode.OK, message.Code);
            Assert.AreEqual("Test Page success", message.Content);
        }
Exemple #3
0
        public void GetEchoXML()
        {
            var        request = XmlRequest.Prepare("http://localhost:8080", "testecho", "value=teststring");
            WebMessage message = request.Get();

            Assert.AreEqual(HttpStatusCode.OK, message.Code);
            Assert.AreEqual("value", message.Source);
            Assert.AreEqual("teststring", message.Content);
        }
Exemple #4
0
        public void GetTestStructMaxXML()
        {
            var        request = XmlRequest.Prepare("http://localhost:8080", "testdata", "structtype=max");
            WebMessage message = request.Get();

            Assert.AreEqual(HttpStatusCode.OK, message.Code);
            ITable <TestData> dataTable = request.Result.GetTable <TestData>();

            Assert.AreEqual(1, dataTable.RowCount);
            TestData data    = dataTable.GetStruct(dataTable.IDs[0]);
            TestData mindata = TestDataMax();

            Assert.True(data.Equals(mindata));
        }