Ejemplo n.º 1
0
        public void Get_returns_persisted_board()
        {
            var expectedBoard = new Board();

            _boardRepository.Get().Returns(expectedBoard);

            var actualBoard = _controller.Get();

            Assert.AreSame(expectedBoard, actualBoard);
        }
 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;
 }
 public InMemoryBoardRepository()
 {
     _board = CreateHardCodedBoard();
 }