public void GetModificationsTest() { Vsts vsts = new Vsts(); vsts.ProjectPath = PROJECT; vsts.Server = SERVER; vsts.Username = USERNAME; vsts.Domain = DOMAIN; vsts.Password = PASSWORD; IIntegrationResult from = IntegrationResultMother.CreateSuccessful(DateTime.Parse("2005-01-01T00:00:00")); IIntegrationResult to = IntegrationResultMother.CreateSuccessful(DateTime.Today.AddDays(1)); Modification[] actual = vsts.GetModifications(from, to); Assert.AreEqual(26, actual.Length, "Didn't get expected number of modifcations"); }
public void GetModificationsForServerThatDoesNotExistTest() { Vsts vsts = new Vsts(); vsts.ProjectPath = PROJECT; vsts.Server = "NoneExistentServer"; IIntegrationResult from = IntegrationResultMother.CreateSuccessful(DateTime.Parse("2005-03-10T00:00:00")); IIntegrationResult to = IntegrationResultMother.CreateSuccessful(DateTime.Parse("2005-10-01T00:00:00")); Modification[] actual = vsts.GetModifications(from, to); Assert.Fail("Exception Expected"); }
public void GetModificationsForSomethingThatDoesNotExistTest() { Vsts vsts = new Vsts(); vsts.ProjectPath = "$/FreeLunch"; vsts.Server = SERVER; vsts.Username = USERNAME; vsts.Domain = DOMAIN; vsts.Password = PASSWORD; IIntegrationResult from = IntegrationResultMother.CreateSuccessful(DateTime.Parse("2005-03-10T00:00:00")); IIntegrationResult to = IntegrationResultMother.CreateSuccessful(DateTime.Parse("2005-10-01T00:00:00")); Modification[] actual = vsts.GetModifications(from, to); Assert.AreEqual(0, actual.Length); }