Beispiel #1
0
        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);
        }
Beispiel #2
0
        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);
        }