Exemplo n.º 1
0
        public void InstantFigures_MutatorAndAccessorById_Test()
        {
            str = new InstantFigure(InstantFigureMocks.InstantFigure_MemberRubric_FieldsAndPropertiesModel(),
                                    "InstantFigure_MemberRubric_FieldsAndPropertiesModel");
            FieldsAndPropertiesModel fom = new FieldsAndPropertiesModel();

            iRts = InstantFigure_Compilation_Helper_Test(str, fom);

            rtsq = new InstantFigures(str, "InstantSequence_Compilation_Test");

            iRtseq = rtsq.New();

            iRtseq.Add(iRtseq.NewFigure());
            iRtseq[0, 4] = iRts[4];

            isel = new InstantSelection(iRtseq);

            IFigures ifsel = isel.New();

            IFigures isel2 = new InstantSelection(ifsel).New();

            isel2.Add(isel2.NewFigure());
            isel2[0, 4] = iRts[4];

            Assert.Equal(iRts[4], isel2[0, 4]);
        }
        public void InstantFigures_SetRubrics_Test()
        {
            str = new InstantFigure(InstantFigureMocks.InstantFigure_MemberRubric_FieldsAndPropertiesModel(),
                                    "InstantFigure_MemberRubric_FieldsAndPropertiesModel");
            FieldsAndPropertiesModel fom = new FieldsAndPropertiesModel();

            iRts = InstantFigure_Compilation_Helper_Test(str, fom);

            rtsq = new InstantFigures(str, "InstantSequence_Compilation_Test");

            var rttab = rtsq.New();

            Assert.Equal(rttab.Rubrics, rtsq.Figure.Rubrics);
        }
        public void InstantFigures_NewFigure_Test()
        {
            str = new InstantFigure(InstantFigureMocks.InstantFigure_MemberRubric_FieldsAndPropertiesModel(),
                                    "InstantFigure_MemberRubric_FieldsAndPropertiesModel");
            FieldsAndPropertiesModel fom = new FieldsAndPropertiesModel();

            iRts = InstantFigure_Compilation_Helper_Test(str, fom);

            rtsq = new InstantFigures(str, "InstantSequence_Compilation_Test");

            iRtseq = rtsq.New();

            IFigure rcst = iRtseq.NewFigure();

            Assert.NotNull(rcst);
        }
        public void InstantFigures_MutatorAndAccessorByName_Test()
        {
            str = new InstantFigure(InstantFigureMocks.InstantFigure_MemberRubric_FieldsAndPropertiesModel(),
                                    "InstantFigure_MemberRubric_FieldsAndPropertiesModel");
            FieldsAndPropertiesModel fom = new FieldsAndPropertiesModel();

            iRts = InstantFigure_Compilation_Helper_Test(str, fom);

            rtsq = new InstantFigures(str, "InstantSequence_Compilation_Test");

            iRtseq = rtsq.New();

            iRtseq.Add(iRtseq.NewFigure());
            iRtseq[0, nameof(fom.Name)] = iRts[nameof(fom.Name)];

            Assert.Equal(iRts[nameof(fom.Name)], iRtseq[0, nameof(fom.Name)]);
        }
        public void InstantFigures_NewFigures_Test()
        {
            str = new InstantFigure(InstantFigureMocks.InstantFigure_MemberRubric_FieldsAndPropertiesModel(),
                                    "InstantFigure_MemberRubric_FieldsAndPropertiesModel");
            FieldsAndPropertiesModel fom = new FieldsAndPropertiesModel();

            iRts = InstantFigure_Compilation_Helper_Test(str, fom);

            rtsq = new InstantFigures(str, "InstantSequence_Compilation_Test");

            var rttab = rtsq.New();

            for (int i = 0; i < 10000; i++)
            {
                rttab.Add((long)int.MaxValue + i, rttab.NewFigure());
            }

            for (int i = 9999; i > -1; i--)
            {
                rttab[i] = rttab.Get(i + (long)int.MaxValue);
            }
        }