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")); }
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")); }
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")); }