public void AddTodo_Positive() { // Arrange var tempTodoDal = new Mock <ITodoDal>(); tempTodoDal.Setup(m => m.Insert(It.IsAny <TodoDTO>())).Returns(1); todoMockDal = tempTodoDal.Object; todoController = new TodoController(todoMockDal); todoController.Request = new HttpRequestMessage(); todoController.Request.SetConfiguration(new HttpConfiguration()); //Act var result = todoController.AddTodo(new TodoDTO()); //Assert Assert.AreEqual(HttpStatusCode.OK, result.StatusCode); }
public TodoManager(ITodoDal todoDal) { _todoDal = todoDal; }
private readonly ITodoDal _todoDal; //Base Class Olmalidi public TodoService(ITodoDal todoDal) { _todoDal = todoDal; }
public void ReInitializeTest() { todoMockDal = setupTodoDal(); }
public TodoController(ITodoDal todoDal) { _todoDal = todoDal; }