예제 #1
0
        public void CheckNotDoneHeadItemIfSubItemsAreNotDone()
        {
            //arrange
            Mock <Sprint> sprint = new Mock <Sprint>();

            Backlog backlog = new Backlog(sprint.Object);

            BacklogItem headItem = new BacklogItem("Desc");
            BacklogItem subItem  = new BacklogItem("sub");

            backlog.AddBacklogItem(headItem);
            headItem.AddSubItem(subItem);

            //act
            headItem.Progress();
            headItem.Progress();

            //assert
            Assert.IsFalse(headItem.state.GetType().Equals("done"));
        }
예제 #2
0
        public void CheckSetBackMainItemState()
        {
            //arrange
            Mock <Sprint> sprint = new Mock <Sprint>();

            Backlog backlog = new Backlog(sprint.Object);

            BacklogItem headItem = new BacklogItem("Desc");
            BacklogItem subItem  = new BacklogItem("sub");


            backlog.AddBacklogItem(headItem);
            headItem.AddSubItem(subItem);

            //act
            headItem.Progress();
            subItem.Progress();
            subItem.Progress();
            subItem.state.SetBack();

            //assert
            Assert.IsTrue(subItem.state.GetType().Equals("todo"));
            Assert.IsTrue(headItem.state.GetType().Equals("doing"));
        }
예제 #3
0
        public void ProgressTest()
        {
            //arrange
            Mock <Sprint> sprint = new Mock <Sprint>();

            Backlog backlog = new Backlog(sprint.Object);

            BacklogItem headItem = new BacklogItem("Desc");

            backlog.AddBacklogItem(headItem);

            //act
            headItem.Progress();

            //assert

            Assert.IsTrue(headItem.state.GetType().Equals("doing"));
        }