Пример #1
0
        public void IsRightTest2()
        {
            IPM pm = new PM("pname.m1(): mixed data");

            Assert.AreEqual(true, pm.It(LevelType.Property, "pname"));
            Assert.AreEqual(true, pm.It(LevelType.Method, "m1"));
            Assert.AreEqual(false, pm.IsRight(LevelType.RightOperandEmpty));
            Assert.AreEqual(true, pm.IsRight(LevelType.RightOperandColon));
            Assert.AreEqual(false, pm.IsRight(LevelType.RightOperandStd));
        }
Пример #2
0
        public void ItTest2()
        {
            IPM pm = new PM("solution.m1().Prop1.right");

            Assert.AreEqual(true, pm.It(LevelType.Property, "solution"));
            Assert.AreEqual(true, pm.Is(LevelType.Method, "m1"));
            Assert.AreEqual(false, pm.It(LevelType.Property, "Prop1"));
            Assert.AreEqual(true, pm.It(1, LevelType.Property, "Prop1"));
            Assert.AreEqual(true, pm.It(LevelType.Property, "right"));
        }
Пример #3
0
        public void IsRightTest1()
        {
            IPM pm = new PM("pname = true");

            Assert.AreEqual(true, pm.It(LevelType.Property, "pname"));
            Assert.AreEqual(false, pm.IsRight(LevelType.RightOperandEmpty));
            Assert.AreEqual(false, pm.IsRight(LevelType.RightOperandColon));
            Assert.AreEqual(true, pm.IsRight(LevelType.RightOperandStd));
        }
Пример #4
0
        public void getRightOperandTest2()
        {
            IPM pm = new PM("pname = true ");

            Assert.AreEqual(true, pm.It(LevelType.Property, "pname"));
            Assert.AreEqual(true, pm.IsRight(LevelType.RightOperandStd));
            Assert.AreEqual(" true ", pm.Levels[0].Data);

            pm = new PM("m(): mixed\ndata ");

            Assert.AreEqual(true, pm.It(LevelType.Method, "m"));
            Assert.AreEqual(true, pm.IsRight(LevelType.RightOperandColon));
            Assert.AreEqual(" mixed\ndata ", pm.Levels[0].Data);
        }
Пример #5
0
        public void ItTest1()
        {
            IPM pm = new PM("solution.m1().right");

            Assert.AreEqual(true, pm.It(LevelType.Property, "solution"));
            Assert.AreEqual(true, pm.It(LevelType.Method, "m1"));
            Assert.AreEqual(false, pm.It(LevelType.Property, "notRealProperty"));
            Assert.AreEqual(true, pm.It(LevelType.Property, "right"));
            Assert.AreEqual(true, pm.It(LevelType.RightOperandEmpty));

            Assert.AreEqual(0, pm.Levels.Count);
            Assert.AreEqual(false, pm.It(LevelType.RightOperandEmpty));
            Assert.AreEqual(false, pm.Is(0, LevelType.RightOperandEmpty));
        }
Пример #6
0
        public void ItTest1()
        {
            IPM pm = new PM("solution.m1().right");

            Assert.True(pm.It(LevelType.Property, "solution"));
            Assert.True(pm.It(LevelType.Method, "m1"));
            Assert.False(pm.It(LevelType.Property, "notRealProperty"));
            Assert.True(pm.It(LevelType.Property, "right"));
            Assert.True(pm.It(LevelType.RightOperandEmpty));

            Assert.Empty(pm.Levels);
            Assert.False(pm.It(LevelType.RightOperandEmpty));
            Assert.False(pm.Is(0, LevelType.RightOperandEmpty));
        }