public void DeleteEventDeleteObject() { int eventId = 1; var boardMock = new Mock <IStore <Board> >(); var listMock = new Mock <IStore <List> >(); var eventMock = new Mock <IStore <Event> >(); eventMock.Setup(store => store.Delete(eventId)); var userStoreMock = new Mock <IUserStore <ApplicationUser> >(); var userMock = new Mock <UserManager <ApplicationUser> >( userStoreMock.Object, null, null, null, null, null, null, null, null); ToDoController controller = new ToDoController(listMock.Object, userMock.Object, eventMock.Object, boardMock.Object); controller.DeleteEvent(eventId); eventMock.Verify(store => store.Delete(eventId)); }