Beispiel #1
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));
        }
Beispiel #2
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));
        }
Beispiel #3
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);
        }