Exemplo n.º 1
0
        public void NoStoriesToBeSorted_ThrowEx()
        {
            //Arrange
            var fakeProvider = new FakeWorkItemProvider();

            var list = new List <string>();
            var sut  = new SortStoriesBySizeCommand(list, fakeProvider);

            //Act & Assert
            Assert.ThrowsException <ArgumentException>(() => sut.Execute(), "No items in this board!");
        }
Exemplo n.º 2
0
        public void ReturnCorrectString()
        {
            //Arrange
            var fakeProvider = new FakeWorkItemProvider();

            var storyA = new Story("TitleStoryA", "DescriptionStoryA", Priority.High, Size.Small);
            var storyB = new Story("TitleStoryB", "DescriptionStoryB", Priority.High, Size.Large);

            fakeProvider.Add(storyA);
            fakeProvider.Add(storyB);

            var list = new List <string>();
            var sut  = new SortStoriesBySizeCommand(list, fakeProvider);

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

            //Assert
            Assert.IsTrue(result.StartsWith($"Story:{Environment.NewLine}  Title: TitleStoryB"));
        }