예제 #1
0
        public void Test5()
        {
            EndPointsResponse response = new EndPointsResponse();

            response.getCommandandID(path4);
            bool ExpectedCheck = response.getCheck2();
            bool resultCheck   = false;

            Assert.AreEqual(ExpectedCheck, resultCheck);
        }
예제 #2
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);
        }
예제 #3
0
        public void Test1()
        {
            EndPointsResponse response = new EndPointsResponse();

            response.getCommandandID(path1);
            string ExpectedCommand = response.getCommand();
            string resultCommand   = "messages";

            Assert.AreEqual(ExpectedCommand, resultCommand);
        }
예제 #4
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);
        }
예제 #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);
        }
예제 #6
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);
        }
예제 #7
0
        public void TestGetshortMsg()
        {
            EndPointsResponse response = new EndPointsResponse();

            response.getCommandandInfo(path6);
            string ExpectedCommand = response.getCommand();
            string resultCommand   = "text";

            Assert.AreEqual(ExpectedCommand, resultCommand);
        }
예제 #8
0
        public void TestEmptyMsg()
        {
            EndPointsResponse response = new EndPointsResponse();

            response.getCommandandInfo(path5);
            string ExpectedCommand = response.getCommand();
            string resultCommand   = "";

            Assert.AreEqual(ExpectedCommand, resultCommand);
        }
예제 #9
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);
        }
예제 #10
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);
        }
예제 #11
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);
        }
예제 #12
0
        public void Test6()
        {
            EndPointsResponse response = new EndPointsResponse();

            response.getCommandandID(path5);
            string ExpectedCommand = response.getCommand();
            string resultCommand   = "";

            Assert.AreEqual(ExpectedCommand, resultCommand);
            bool ExpectedCheck = response.getCheck2();
            bool resultCheck   = false;

            Assert.AreEqual(ExpectedCheck, resultCheck);
        }