public AddDateRange ( System.DateTime afterDate, System.DateTime beforeDate ) : void | ||
afterDate | System.DateTime | |
beforeDate | System.DateTime | |
Résultat | void |
public void TestAddBeforeDateDefault() { var fb = new FindFilterBuilder(); fb.AddDateRange(DateTime.MinValue, new DateTime(2013, 05, 05, 0, 0, 0, DateTimeKind.Utc)); var actual = fb.ToString(); Assert.AreEqual("where date <= '2013-05-05T00:00:00.0000000Z'", actual); }
public void TestAddDateRange() { var fb = new FindFilterBuilder(); fb.AddDateRange(new DateTime(2013, 05, 01, 0, 0, 0, DateTimeKind.Utc), new DateTime(2013, 05, 05, 0, 0, 0, DateTimeKind.Utc)); var actual = fb.ToString(); Assert.AreEqual("where date between '2013-05-01T00:00:00.0000000Z' and '2013-05-05T00:00:00.0000000Z'", actual); }
public void TestMultiplePropertiesWithRepositories() { var fb = new FindFilterBuilder(); fb.AddChangeset(new[] {2, 5, 7}); fb.AddDateRange(DateTime.MinValue, new DateTime(2013, 05, 05, 0, 0, 0, DateTimeKind.Utc)); fb.AddRepositoryString(new[] {"repo1", "repo2"}); var actual = fb.ToString(); Assert.AreEqual( "where (changeset = 2 or changeset = 5 or changeset = 7) and date <= '2013-05-05T00:00:00.0000000Z' on repositories 'repo1', 'repo2'", actual); }