コード例 #1
0
        public void TestSerialization()
        {
            ApplicationMoleculeBuilder x1 = CreateObject <ApplicationMoleculeBuilder>().WithName("AppMoleculeBuilder");
            IFormula f2 = CreateObject <ConstantFormula>().WithDimension(DimensionLength).WithValue(3.4);

            x1.Formula = f2;
            x1.RelativeContainerPath = new ObjectPath(new[] { "A", "B" });

            IApplicationMoleculeBuilder x2 = SerializeAndDeserialize(x1);

            AssertForSpecs.AreEqualApplicationMoleculeBuilder(x1, x2);
        }
コード例 #2
0
        protected override void Context()
        {
            base.Context();
            var amb1 = new ApplicationMoleculeBuilder().WithName("drug");

            amb1.RelativeContainerPath = new ObjectPath("..", "C1");
            amb1.Formula = new ExplicitFormula("0");


            var amb2 = new ApplicationMoleculeBuilder().WithName("drug");

            amb2.RelativeContainerPath = new ObjectPath("..", "C2");
            amb2.Formula = new ExplicitFormula("1");


            _object1 = amb1;
            _object2 = amb2;
        }
コード例 #3
0
        protected override void Context()
        {
            base.Context();
            var eg1 = new ApplicationBuilder().WithName("Events");

            eg1.MoleculeName = "Drug";
            var am1 = new ApplicationMoleculeBuilder().WithName("Start").WithParentContainer(eg1);

            am1.RelativeContainerPath = new ObjectPath("..", "C1");


            var eg2 = new ApplicationBuilder().WithName("Events");

            eg2.MoleculeName = "Drug";
            var am2 = new ApplicationMoleculeBuilder().WithName("Start").WithParentContainer(eg2);

            am2.RelativeContainerPath = new ObjectPath("..", "C2");

            _object1 = eg1;
            _object2 = eg2;
        }