Пример #1
0
        public void DeleteBoardDeleteObject()
        {
            int boardId = 1;

            var boardMock = new Mock <IStore <Board> >();

            boardMock.Setup(store => store.Delete(boardId));
            var listMock      = new Mock <IStore <List> >();
            var eventMock     = new Mock <IStore <Event> >();
            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.DeleteBoard(boardId);
            boardMock.Verify(store => store.Delete(boardId));
        }