public void ShouldGetOne() { var applicationUserManager = this.GetApplicationUserManagerMock(); var applicationDbContext = this.GetApplicationDbContextMock(); var todoController = new TodoController(applicationUserManager.Object, applicationDbContext.Object); var todo = todoController.GetOne(1).Result as OkNegotiatedContentResult<ToDo>; Assert.IsNotNull(todo); Assert.AreEqual(todo.Content.Id, 1); Assert.AreEqual(todo.Content.User.Id, "1"); }
public void ShouldGetOne() { var applicationUserManager = this.GetApplicationUserManagerMock(); var applicationDbContext = this.GetApplicationDbContextMock(); var todoController = new TodoController(applicationUserManager.Object, applicationDbContext.Object); var todo = todoController.GetOne(1).Result as OkNegotiatedContentResult <ToDo>; Assert.IsNotNull(todo); Assert.AreEqual(todo.Content.Id, 1); Assert.AreEqual(todo.Content.User.Id, "1"); }