コード例 #1
0
        public void Get_returns_persisted_board()
        {
            var expectedBoard = new Board();

            _boardRepository.Get().Returns(expectedBoard);

            var actualBoard = _controller.Get();

            Assert.AreSame(expectedBoard, actualBoard);
        }
コード例 #2
0
 private static Board CreateHardCodedBoard()
 {
     var board = new Board
     {
         Name = "Testing board name",
         SwimLanes = new List<SwimLane>
                                         {
                                             new SwimLane
                                                 {
                                                     Id = Guid.NewGuid(),
                                                     Name = "Todo",
                                                     Items = new List<BoardItem>
                                                                 {
                                                                     new BoardItem { Description = "Item 1" },
                                                                     new BoardItem { Description = "Item 2" },
                                                                 }
                                                 },
                                             new SwimLane
                                                 {
                                                     Id = Guid.NewGuid(),
                                                     Name = "In Progress",
                                                     Items = new List<BoardItem>
                                                                 {
                                                                     new BoardItem { Description = "Item 3" },
                                                                 }
                                                 },
                                             new SwimLane
                                                 {
                                                     Id = Guid.NewGuid(),
                                                     Name = "Done",
                                                     Items = new List<BoardItem>
                                                                 {
                                                                     new BoardItem { Description = "Item 4" },
                                                                     new BoardItem { Description = "Item 5" },
                                                                     new BoardItem { Description = "Item 6, which has a very long description to simplify styling work" },
                                                                 }
                                                 },
                                         }
     };
     return board;
 }
コード例 #3
0
 public InMemoryBoardRepository()
 {
     _board = CreateHardCodedBoard();
 }