Beispiel #1
0
        public void GetBoardReturnNotNull()
        {
            int boardId   = 1;
            var boardMock = new Mock <IStore <Board> >();

            boardMock.Setup(store => store.Get(boardId)).Returns(() => GetTestBoards().FirstOrDefault(board => board.Id == 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);

            Assert.NotNull(controller.GetBoard(boardId));
        }