Ejemplo n.º 1
0
        public void TwoNameCriteria()
        {
            ITestMethod tm =
                new TestMethod(new TestFixture(typeof(SampleTestFixture)),
                               typeof(SampleTestFixture).GetMethod("Foo"));
            var addCriterion = new OrCriterion();

            addCriterion.Add(new NameCriterion(typeof(SampleTestFixture).FullName + ".Foo"));
            addCriterion.Add(new NameCriterion("bar"));
            var testRun = new TestRun(addCriterion);

            Assert.True(testRun.Contains(tm));
        }
Ejemplo n.º 2
0
        public void ApiDesign()
        {
            var query = new DataQuery();
            var and   = new AndCriterion();

            and.Add(new DimensionCriterion()
            {
                Name = "JD_CATEGORY", Value = "A"
            });
            and.Add(new DimensionCriterion()
            {
                Name = "FREQ", Value = "A"
            });
            and.Add(new DimensionCriterion()
            {
                Name = "FREQ", Value = "M"
            });

            and.Add(new TimePeriodCriterion()
            {
                StartTime = TimePeriod.FromDate(new DateTime(2000, 1, 1)),
                EndTime   = TimePeriod.FromDate(new DateTime(2000, 12, 31))
            });
            var or = new OrCriterion();

            or.Add(new DataSetCriterion()
            {
                Name = "JD014"
            });
            and.Add(or);

            query.Criterion = and;
        }
Ejemplo n.º 3
0
        public void ApiDesign()
        {
            var query = new DataQuery();
            var and = new AndCriterion();
            and.Add(new DimensionCriterion() { Name = "JD_CATEGORY", Value = "A" });
            and.Add(new DimensionCriterion() { Name = "FREQ", Value = "A" });
            and.Add(new DimensionCriterion() { Name = "FREQ", Value = "M" });

            and.Add(new TimePeriodCriterion()
                {
                    StartTime = TimePeriod.FromDate(new DateTime(2000, 1, 1)),
                    EndTime = TimePeriod.FromDate(new DateTime(2000, 12, 31))
                });
            var or = new OrCriterion();
            or.Add(new DataSetCriterion() { Name = "JD014" });
            and.Add(or);

            query.Criterion = and;
        }