Beispiel #1
0
        public void Test14()
        {
            EndPointsResponse response = new EndPointsResponse();

            response.Methodhandler(method2, path1, m2);
            Response ExpectedCommand = response.Methodhandler(method3, path2, m1);
            Response resultCommand   = new Response {
                status = HttpStatus.Ok, content = " Message deleted at this id."
            };

            Assert.AreEqual(ExpectedCommand, resultCommand);
        }
Beispiel #2
0
        public void Test13()
        {
            EndPointsResponse response = new EndPointsResponse();

            response.Methodhandler(method2, path1, m2);
            Response ExpectedCommand = response.Methodhandler(method4, path2, m3);
            Response resultCommand   = new Response {
                status = HttpStatus.Ok, content = m3 + " is updated at this id."
            };

            Assert.AreEqual(ExpectedCommand, resultCommand);
        }
Beispiel #3
0
        public void Test12()
        {
            EndPointsResponse response = new EndPointsResponse();

            response.Methodhandler(method2, path1, m2);
            response.Methodhandler(method2, path1, m3);
            Response ExpectedCommand = response.Methodhandler(method1, path1, m1);
            string   joined          = string.Join("\n", m2, m3);
            Response resultCommand   = new Response {
                status = HttpStatus.Ok, content = " You have these Messages:\n" + joined
            };

            Assert.AreEqual(ExpectedCommand, resultCommand);
        }
Beispiel #4
0
        public void Test16()
        {
            EndPointsResponse response        = new EndPointsResponse();
            Response          ExpectedCommand = response.Methodhandler(method1, path6, m1);
            Response          resultCommand   = new Response {
                status = HttpStatus.Not_Found
            };

            Assert.AreEqual(ExpectedCommand, resultCommand);
        }
Beispiel #5
0
        public void Test15()
        {
            EndPointsResponse response        = new EndPointsResponse();
            Response          ExpectedCommand = response.Methodhandler(method5, path1, m1);
            Response          resultCommand   = new Response {
                status = HttpStatus.Method_Not_Allowed
            };

            Assert.AreEqual(ExpectedCommand, resultCommand);
        }
Beispiel #6
0
        public void Test9()
        {
            EndPointsResponse response        = new EndPointsResponse();
            Response          ExpectedCommand = response.Methodhandler(method2, path1, m1);
            Response          resultCommand   = new Response {
                status = HttpStatus.Ok, content = m1 + " is added."
            };

            Assert.AreEqual(ExpectedCommand, resultCommand);
        }
Beispiel #7
0
        public void TestPostwithLongMsg()
        {
            EndPointsResponse response        = new EndPointsResponse();
            Response          ExpectedCommand = response.Methodhandler(method2, path3, m1, Au1, p);
            Response          resultCommand   = new Response {
                status = HttpStatus.Not_Found
            };;

            Assert.AreEqual(ExpectedCommand, resultCommand);
        }