public void Test_OrchestrationInstanceQuery_CreatedTimeVariations() { var queryBuilder = new OrchestrationInstanceStatusQueryBuilder(); var createdTimeFrom = new DateTime(2018, 1, 10, 10, 10, 10); queryBuilder.AddCreatedTime(createdTimeFrom, default(DateTime)); Assert.Equal("CreatedTime ge datetime'2018-01-10T01:10:10.0000000Z'", queryBuilder.Build().FilterString); var createdTimeTo = new DateTime(2018, 1, 10, 10, 10, 50); queryBuilder.AddCreatedTime(default(DateTime), createdTimeTo); Assert.Equal("CreatedTime le datetime'2018-01-10T01:10:50.0000000Z'", queryBuilder.Build().FilterString); }
public void Test_OrchestrationInstanceQuery_RuntimeStatus() { var queryBuilder = new OrchestrationInstanceStatusQueryBuilder(); queryBuilder.AddRuntimeStatus("Runnning"); var query = queryBuilder.Build(); Assert.Equal("RuntimeStatus eq 'Runnning'", query.FilterString); }
public void Test_OrchestrationInstanceQuery_CreatedTime() { var queryBuilder = new OrchestrationInstanceStatusQueryBuilder(); var createdTimeFrom = new DateTime(2018, 1, 10, 10, 10, 10); var createdTimeTo = new DateTime(2018, 1, 10, 10, 10, 50); queryBuilder.AddCreatedTime(createdTimeFrom, createdTimeTo); var result = queryBuilder.Build().FilterString; Assert.Equal("(CreatedTime ge datetime'2018-01-10T01:10:10.0000000Z') and (CreatedTime le datetime'2018-01-10T01:10:50.0000000Z')", queryBuilder.Build().FilterString); }