public void GetUserStoryHistories_CalledForStatusPlanned_ReturnsUserStoryHistoriesOnlyForStatusPlanned() { TP tp = new TP(new TPWebServiceClient()); tp.TPWebServiceClient = new TPWebServiceClient(); UserStoryHistiories histories = tp.GetUserStoryHistories("Planned"); Assert.That(histories.Items, Has.All.Matches <UserStoryHistiory>(h => h.EntityState.Name.ToLower() == "planned")); }
public void GetUserStoryHistories_CalledForUserStoryId15_ReturnsUserStoryHistoriesOnlyForUserStoryID15() { TP tp = new TP(new TPWebServiceClient()); tp.TPWebServiceClient = new TPWebServiceClient(); UserStoryHistiories histories = tp.GetUserStoryHistories(15); Assert.That(histories.Items, Has.All.Matches <UserStoryHistiory>(h => h.UserStory.Id == 15)); }
public void GetUserStoryHistories_CalledForUserStoryId31390AndStatusInProgress_ReturnsUserStoryHistoriesOnlyForUserStoryID15AndStatusInProgress() { TP tp = new TP(new TPWebServiceClient()); tp.TPWebServiceClient = new TPWebServiceClient(); UserStoryHistiories histories = tp.GetUserStoryHistories(31390, "In Progress"); Assert.That(histories.Items, Has.All.Matches <UserStoryHistiory>(h => h.UserStory.Id == 31390)); Assert.That(histories.Items, Has.All.Matches <UserStoryHistiory>(h => h.EntityState.Name.ToLower() == "in progress")); }
public void GetUserStoryHistories_CalledForUserStoryID31390AndPeriod20150326To20150327_ReturnsUserStoryHistoriesOnlyForUserStoryID31390And20150327() { TP tp = new TP(new TPWebServiceClient()); tp.TPWebServiceClient = new TPWebServiceClient(); DateTime startDate = new DateTime(2015, 3, 26); DateTime endDate = new DateTime(2015, 3, 27); DateTime testDate1 = new DateTime(2015, 3, 25); UserStoryHistiories histories = tp.GetUserStoryHistories(31390, startDate, endDate); Assert.That(histories.Items, Has.All.Matches <UserStoryHistiory>(h => h.UserStory.Id == 31390)); Assert.That(histories.Items, Has.All.Not.Matches <UserStoryHistiory>(h => h.Date.Date == testDate1.Date)); Assert.That(histories.Items, Has.Some.Matches <UserStoryHistiory>(h => h.Date.Date == endDate.Date)); }
public void GetUserStoryHistories_CalledForUserStoryID31390AndPeriod20150326To20150327AndStatusUAT_ReturnsUserStoryHistoriesOnlyForUserStoryID31390And20150327AndStatusUAT() { TP tp = new TP(new TPWebServiceClient()); tp.TPWebServiceClient = new TPWebServiceClient(); DateTime startDate = new DateTime(2015, 3, 26); DateTime endDate = new DateTime(2015, 3, 27); DateTime testDate1 = new DateTime(2015, 3, 25); UserStoryHistiories histories = tp.GetUserStoryHistories(31390, "User Acceptance testing", startDate, endDate); Assert.That(histories.Items, Has.All.Matches <UserStoryHistiory>(h => h.UserStory.Id == 31390)); Assert.That(histories.Items, Has.All.Not.Matches <UserStoryHistiory>(h => h.Date.Date == testDate1.Date)); Assert.That(histories.Items, Has.Some.Matches <UserStoryHistiory>(h => h.Date.Date == endDate.Date)); Assert.That(histories.Items, Has.All.Matches <UserStoryHistiory>(h => h.EntityState.Name.ToLower() == "user acceptance testing")); }