示例#1
0
        public override void TestInitialize()
        {
            base.TestInitialize();
            var c = GetRandom.Count();

            for (var i = 0; i < c; i++)
            {
                Roles.Instance.Add(Role.Random());
            }
        }
示例#2
0
        public static MeasureTerms Random()
        {
            var t = new MeasureTerms();

            for (var i = 0; i < GetRandom.Count(); i++)
            {
                t.Add(MeasureTerm.Random());
            }
            return(t);
        }
示例#3
0
        public static UnitTerms Random()
        {
            var t = new UnitTerms();

            for (var i = 0; i < GetRandom.Count(); i++)
            {
                t.Add(UnitTerm.Random());
            }
            return(t);
        }
示例#4
0
        [TestInitialize] public override void TestInitialize()
        {
            base.TestInitialize();
            obj = TestClass.Random();
            var c = GetRandom.Count();

            for (var i = 0; i < c; i++)
            {
                Attributes.Instance.Add(Attribute.Random());
            }
        }
示例#5
0
        public static ProductTypes Random()
        {
            var r = new ProductTypes();
            var c = GetRandom.Count();

            for (var i = 0; i < c; i++)
            {
                r.Add(ProductType.Random());
            }
            return(r);
        }
        public static Entities Random()
        {
            var e = new Entities();
            var c = GetRandom.Count();

            for (var i = 0; i < c; i++)
            {
                e.Add(Entity.Random());
            }
            return(e);
        }
示例#7
0
        public static RoleTypes Random()
        {
            var r = new RoleTypes();
            var c = GetRandom.Count();

            for (var i = 0; i < c; i++)
            {
                r.Add(RoleType.Random());
            }
            return(r);
        }
示例#8
0
        public static Products Random(byte min = 3, byte max = 10)
        {
            var p = new Products();
            var c = GetRandom.Count(min, max);

            for (var i = 0; i < c; i++)
            {
                p.Add(ProductInstance.GetRandomDerived());
            }
            return(p);
        }
示例#9
0
        public new static OrderUses Random()
        {
            var r = new OrderUses();
            var c = GetRandom.Count(1, 2);

            for (var i = 0; i < c; i++)
            {
                r.Add(GetRandom.String(5, 7));
            }
            return(r);
        }
示例#10
0
        protected override Archetypes <string> GetRandomObj()
        {
            var a = new Archetypes <string>();
            var c = GetRandom.Count();

            for (var i = 0; i < c; i++)
            {
                a.Add(GetRandom.String());
            }
            return(a);
        }
示例#11
0
        public static RoleConstraints Random()
        {
            var r = new RoleConstraints();
            var c = GetRandom.Count();

            for (var i = 0; i < c; i++)
            {
                r.Add(RoleConstraint.Random());
            }
            return(r);
        }
示例#12
0
        public static CatalogEntries Random()
        {
            var r = new CatalogEntries();
            var c = GetRandom.Count();

            for (var i = 0; i < c; i++)
            {
                r.Add(CatalogEntry.Random());
            }
            return(r);
        }
示例#13
0
        public static Contacts Random()
        {
            var r = new Contacts();
            var c = GetRandom.Count();

            for (var i = 0; i < c; i++)
            {
                r.Add(ContactInstance.Random());
            }
            return(r);
        }
示例#14
0
        public static InventoryEntries Random()
        {
            var r = new InventoryEntries();
            var c = GetRandom.Count();

            for (var i = 0; i < c; i++)
            {
                r.Add(InventoryEntry.Random());
            }
            return(r);
        }
示例#15
0
文件: Units.cs 项目: pihlakad/Project
        public static Units Random()
        {
            var u = new Units();
            var c = GetRandom.Count(2, 5);

            for (int i = 0; i < c; i++)
            {
                u.Add(Unit.Random());
            }
            return(u);
        }
示例#16
0
        public static Relationships Random()
        {
            var r = new Relationships();
            var c = GetRandom.Count();

            for (var i = 0; i < c; i++)
            {
                r.Add(Relationship.Random());
            }
            return(r);
        }
示例#17
0
        public static Orders Random()
        {
            var r = new Orders();
            var c = GetRandom.Count();

            for (var i = 0; i < c; i++)
            {
                r.Add(Order.Random());
            }
            return(r);
        }
示例#18
0
        public static Measures Random()
        {
            var m = new Measures();
            var c = GetRandom.Count(2, 5);

            for (var i = 0; i < c; i++)
            {
                m.Add(Measure.Random());
            }
            return(m);
        }
示例#19
0
        public static Inventory Random()
        {
            var a = new Inventory();
            var b = GetRandom.Count();

            for (var i = 0; i < b; i++)
            {
                a.Add(InventoryEntry.Random());
            }
            return(a);
        }
示例#20
0
        [TestMethod] public void AttributesTest()
        {
            Assert.AreEqual(0, obj.Attributes.Count);
            var c = GetRandom.Count();

            for (var i = 0; i < c; i++)
            {
                var a = Attribute.Random();
                a.EntityId = obj.UniqueId;
                Attributes.Instance.Add(a);
            }
            Assert.AreEqual(c, obj.Attributes.Count);
        }
示例#21
0
        [TestMethod] public void RolesTest()
        {
            Assert.AreEqual(0, Obj.Roles.Count);
            var c = GetRandom.Count();

            for (var i = 0; i < c; i++)
            {
                var r = Role.Random();
                r.PerformerId = Obj.UniqueId;
                Roles.Instance.Add(r);
            }
            Assert.AreEqual(c, Obj.Roles.Count);
        }