Пример #1
0
		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");
		}
Пример #2
0
		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");
		}
Пример #3
0
		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);
		}