public void GetEventListEmpty() { int listId = 0; var boardMock = new Mock <IStore <Board> >(); var listMock = new Mock <IStore <List> >(); var eventMock = new Mock <IStore <Event> >(); eventMock.Setup(store => store.GetList(listId)).Returns(() => GetTestEvents().Where(eventr => eventr.ListId == listId)); 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); Assert.Empty(controller.GetEvent(listId)); }