예제 #1
0
        public void SaveExtent()
        {
            foreach (var init in this.Inits)
            {
                init();
                var population = new TestPopulation(this.Session);

                var extent = new Filter(M.C1.ObjectType)
                {
                    Predicate = new Equals(M.C1.C1AllorsString)
                    {
                        Parameter = "pString"
                    }
                };


                var schemaExtent = extent.Save();

                Assert.NotNull(schemaExtent);

                Assert.Equal(Data.Protocol.ExtentKind.Filter, schemaExtent.Kind);

                var predicate = schemaExtent.Predicate;

                Assert.NotNull(predicate);
                Assert.Equal(Data.Protocol.PredicateKind.Equals, predicate.Kind);
                Assert.Equal("pString", predicate.Parameter);
            }
        }
예제 #2
0
        public void LoadExtent()
        {
            foreach (var init in this.Inits)
            {
                init();
                var population = new TestPopulation(this.Session);

                var schemaExtent = new Data.Protocol.Extent
                {
                    Kind       = Data.Protocol.ExtentKind.Filter,
                    ObjectType = M.C1.ObjectType.Id,
                    Predicate  = new Data.Protocol.Predicate
                    {
                        Kind         = Data.Protocol.PredicateKind.Equals,
                        PropertyType = M.C1.C1AllorsString.Id,
                        Value        = "ᴀbra"
                    }
                };

                var extent = schemaExtent.Load(this.Session);

                var objects = this.Session.Resolve <C1>(extent);

                Assert.Single(objects);
            }
        }
예제 #3
0
        public void EqualsMissingParameter()
        {
            foreach (var init in this.Inits)
            {
                init();
                var population = new TestPopulation(this.Session);

                var extent = new Filter(M.C1.ObjectType)
                {
                    Predicate = new Equals(M.C1.C1AllorsString)
                    {
                        Parameter = "pString"
                    }
                };

                var objects = this.Session.Resolve <C1>(extent);

                Assert.Equal(4, objects.Length);
            }
        }
예제 #4
0
        public void EqualsWithParameter()
        {
            foreach (var init in this.Inits)
            {
                init();
                var population = new TestPopulation(this.Session);

                var extent = new Filter(M.C1.ObjectType)
                {
                    Predicate = new Equals(M.C1.C1AllorsString)
                    {
                        Parameter = "pString"
                    }
                };

                var objects = this.Session.Resolve <C1>(extent, new { pString = "ᴀbra" });

                Assert.Single(objects);
            }
        }
예제 #5
0
        protected void Populate()
        {
            var population = new TestPopulation(this.Session);

            this.c1_0 = population.C1A;
            this.c1_1 = population.C1B;
            this.c1_2 = population.C1C;
            this.c1_3 = population.C1D;
            this.c2_0 = population.C2A;
            this.c2_1 = population.C2B;
            this.c2_2 = population.C2C;
            this.c2_3 = population.C2D;
            this.c3_0 = population.C3A;
            this.c3_1 = population.C3B;
            this.c3_2 = population.C3C;
            this.c3_3 = population.C3D;
            this.c4_0 = population.C4A;
            this.c4_1 = population.C4B;
            this.c4_2 = population.C4C;
            this.c4_3 = population.C4D;
        }
예제 #6
0
 protected void Populate()
 {
     var population = new TestPopulation(this.Session);
     this.c1_0 = population.C1A;
     this.c1_1 = population.C1B;
     this.c1_2 = population.C1C;
     this.c1_3 = population.C1D;
     this.c2_0 = population.C2A;
     this.c2_1 = population.C2B;
     this.c2_2 = population.C2C;
     this.c2_3 = population.C2D;
     this.c3_0 = population.C3A;
     this.c3_1 = population.C3B;
     this.c3_2 = population.C3C;
     this.c3_3 = population.C3D;
     this.c4_0 = population.C4A;
     this.c4_1 = population.C4B;
     this.c4_2 = population.C4C;
     this.c4_3 = population.C4D;
 }
예제 #7
0
        protected void Populate()
        {
            var population = new TestPopulation(this.Session);

            this.c1A = population.C1A;
            this.c1B = population.C1B;
            this.c1C = population.C1C;
            this.c1D = population.C1D;

            this.c2A = population.C2A;
            this.c2B = population.C2B;
            this.c2C = population.C2C;
            this.c2D = population.C2D;

            this.c3A = population.C3A;
            this.c3B = population.C3B;
            this.c3C = population.C3C;
            this.c3D = population.C3D;

            this.c4A = population.C4A;
            this.c4B = population.C4B;
            this.c4C = population.C4C;
            this.c4D = population.C4D;
        }