예제 #1
0
        public void GetActionForPathReturnsNull()
        {
            var mockRequest = new Mock <HttpRequest>();

            mockRequest.Setup(x => x.Method).Returns("POST");
            mockRequest.Setup(x => x.Path).Returns("/somePath/thatIsNotThere");

            var routeAction = BotFrameworkHttpSkillsServer.GetRoute(mockRequest.Object);

            Assert.Null(routeAction);
        }
예제 #2
0
        public void GetActionForPath(string expectedMethod, string httpMethod, string path)
        {
            var mockRequest = new Mock <HttpRequest>();

            mockRequest.Setup(x => x.Method).Returns(httpMethod);
            mockRequest.Setup(x => x.Path).Returns(path);

            var routeAction = BotFrameworkHttpSkillsServer.GetRoute(mockRequest.Object);

            Assert.Equal(expectedMethod, routeAction.Method);
        }