public void GetRoute_RouteNotExists()
 {
     try
     {
         _routesController.Get("test.performance.a");
     }
     catch (ResponseException) { }
 }
Exemplo n.º 2
0
        public void GetRoutesTest()
        {
            _routeSevice.Setup(x => x.GetAvailableRoutes(It.IsAny <string>())).Returns(GetViajeDistribucionList());

            // Act
            IHttpActionResult actionResult = _controller.Get();
            var contentResult = actionResult as OkNegotiatedContentResult <RouteList>;

            // Assert
            Assert.IsNotNull(contentResult);
            Assert.IsNotNull(contentResult.Content);
            Assert.IsInstanceOf(typeof(RouteList), contentResult.Content, "the content is not a list of routes");
        }