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); }
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); }