public void Methods()
        {
            this.Populate();

            var c1 = this.Population.C1;
            var c2 = this.Population.C2;
            var i1 = this.Population.I1;
            var i2 = this.Population.I2;

            Assert.AreEqual(0, c1.MethodTypes.Count());

            var methodC1 = new MethodTypeBuilder(this.Domain, Guid.NewGuid()).Build();

            methodC1.ObjectType = this.Population.C1;
            methodC1.Name       = "MethodC1";

            Assert.AreEqual(1, c1.MethodTypes.Count());

            var methodC2 = new MethodTypeBuilder(this.Domain, Guid.NewGuid()).Build();

            methodC2.ObjectType = this.Population.C2;
            methodC2.Name       = "MethodC2";

            Assert.AreEqual(1, c1.MethodTypes.Count());

            var methodI1 = new MethodTypeBuilder(this.Domain, Guid.NewGuid()).Build();

            methodI1.ObjectType = this.Population.I1;
            methodI1.Name       = "MethodI1";

            Assert.AreEqual(2, c1.MethodTypes.Count());
        }
Exemplo n.º 2
0
        public void ValidateDuplicateMethod()
        {
            this.Populate();

            var methodType = new MethodTypeBuilder(this.Domain, Guid.NewGuid()).Build();
            methodType.ObjectType = this.Population.C1;
            methodType.Name = "MyName";

            Assert.IsTrue(this.MetaPopulation.IsValid);

            var otherMethodType = new MethodTypeBuilder(this.Domain, Guid.NewGuid()).Build();
            methodType.ObjectType = this.Population.C1;
            methodType.Name = "MyName";

            Assert.IsFalse(this.MetaPopulation.IsValid);
        }
Exemplo n.º 3
0
        public void ValidateDuplicateMethod()
        {
            this.Populate();

            var methodType = new MethodTypeBuilder(this.Domain, Guid.NewGuid()).Build();

            methodType.ObjectType = this.Population.C1;
            methodType.Name       = "MyName";

            Assert.IsTrue(this.MetaPopulation.IsValid);

            var otherMethodType = new MethodTypeBuilder(this.Domain, Guid.NewGuid()).Build();

            methodType.ObjectType = this.Population.C1;
            methodType.Name       = "MyName";

            Assert.IsFalse(this.MetaPopulation.IsValid);
        }
Exemplo n.º 4
0
        public void Methods()
        {
            this.Populate();

            var c1 = this.Population.C1;
            var c2 = this.Population.C2;
            var i1 = this.Population.I1;
            var i2 = this.Population.I2;

            Assert.AreEqual(0, c1.MethodTypes.Count());

            var methodC1 = new MethodTypeBuilder(this.Domain, Guid.NewGuid()).Build();
            methodC1.ObjectType = this.Population.C1;
            methodC1.Name = "MethodC1";

            Assert.AreEqual(1, c1.MethodTypes.Count());

            var methodC2 = new MethodTypeBuilder(this.Domain, Guid.NewGuid()).Build();
            methodC2.ObjectType = this.Population.C2;
            methodC2.Name = "MethodC2";

            Assert.AreEqual(1, c1.MethodTypes.Count());

            var methodI1 = new MethodTypeBuilder(this.Domain, Guid.NewGuid()).Build();
            methodI1.ObjectType = this.Population.I1;
            methodI1.Name = "MethodI1";

            Assert.AreEqual(2, c1.MethodTypes.Count());
        }