Пример #1
0
        public void GetHelloWorldTestConsole_ShouldReturnValue()
        {
            IGreeter greeter = new ConsoleGreeter();
            IWriter  writer  = new ConsoleWriter();

            HelloController helloController = new HelloController(greeter, writer)
            {
                Request = new HttpRequestMessage()
            };

            helloController.Request.SetConfiguration(new HttpConfiguration());
            HttpResponseMessage result = helloController.GetHelloWorld();

            Assert.IsNotNull(result);
            Assert.IsTrue(result.StatusCode == System.Net.HttpStatusCode.OK);
        }