Esempio n. 1
0
        public void ReturnCorrectString()
        {
            //Arrange
            //var team = new Team("Ducks");
            var board = new Board("Trello");

            //CurrentVariables.currentTeam = team;
            Commons.currentBoard = board;
            var currBoardItems = Commons.currentBoard;
            var story          = new Story("NewCreatedStory", "NewCreateBugStoryDescr", Priority.Low, Size.Large);
            var member         = new Member("Pesho");

            story.Assignee = member;
            currBoardItems.WorkItems.Add(story);
            var listParams = new List <string>()
            {
                story.Title
            };
            var sut = new UnassignCommand(listParams);

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

            //Assert
            Assert.AreEqual(result, "Pesho has been unassigned from NewCreatedStory");
        }
Esempio n. 2
0
        public void ThrowWhen_NoWorkItemsInBoard()
        {
            //Arrange
            var list = new List <string>();
            var sut  = new UnassignCommand(list);

            //Act & Assert
            Assert.ThrowsException <ArgumentException>(() => sut.Execute());
        }