public void Chat() { var userServerce = new Mock<IUserService>(); var chatService = new Mock<IChatRoomService>(); var tripServerce = new Mock<ITripService>(); var commentService = new Mock<ICommentService>(); var controller = new HomeController(userServerce.Object, chatService.Object, tripServerce.Object); controller.WithCallTo(x => x.Chat()) .ShouldRenderView("Chat"); }
public void GetTrips() { var userServerce = new Mock<IUserService>(); var chatService = new Mock<IChatRoomService>(); var tripServerce = new Mock<ITripService>(); var commentService = new Mock<ICommentService>(); tripServerce.Setup(x => x.GetAll()) .Returns(new List<Trip>().AsQueryable()); var controller = new HomeController(userServerce.Object, chatService.Object, tripServerce.Object); controller.WithCallTo(x => x.GetTrips()) .ShouldReturnJson(); }