Esempio n. 1
0
        public void Test_error()
        {
            HiHelloController hihelloapi = new HiHelloController();
            var result = hihelloapi.Get("xyz");

            Assert.Equal("error", result);
        }
Esempio n. 2
0
        public void Test_hi()
        {
            HiHelloController hihelloapi = new HiHelloController();
            var result = hihelloapi.Get("hi");

            Assert.Equal("hello", result);
        }
        public void Hi_Controller_Checks()
        {
            HiHelloController HiControllerObject = new HiHelloController();

            Assert.Equal("type in url hi or hello", HiControllerObject.Get());
            Assert.Equal("error", HiControllerObject.Get(""));
            Assert.Equal("hello", HiControllerObject.Get("hi"));
        }
Esempio n. 4
0
        public void Hello_Controller_Checks()
        {
            HiHelloController HelloControllerObject = new HiHelloController();

            Assert.Equal("append \"hi\" or \"hello\" in the url to get response",
                         HelloControllerObject.Get());
            Assert.Equal("error", HelloControllerObject.Get(""));
            Assert.Equal("hi", HelloControllerObject.Get("hello"));
        }
Esempio n. 5
0
        public void HiHelloController_should_be_able_to_reply_to_hello_with_hi()
        {
            var hiHelloController = new HiHelloController();

            hiHelloController.Get("hello").Value.Should().Be("hi");
        }