Ejemplo n.º 1
0
        public void ThrowWhen_NoBoard()
        {
            //Arrange
            var fakeProvider = new FakeBoardProvider();
            var list         = new List <string>();
            var sut          = new ListAllBoardsCommand(list, fakeProvider);

            //Act & Assert
            Assert.ThrowsException <ArgumentException>(() => sut.Execute());
        }
Ejemplo n.º 2
0
        public void ListAllBoards_Success()
        {
            //Arrange
            var fakeProvider = new FakeBoardProvider();
            var listParams   = new List <string>();

            var board1 = new Board("Board1");
            var board2 = new Board("Board2");

            fakeProvider.Add(board1);
            fakeProvider.Add(board2);

            var sut = new ListAllBoardsCommand(listParams, fakeProvider);

            //Act
            var result = sut.Execute();

            //Assert
            Assert.IsTrue(result.StartsWith($"Board1"));
        }