public void FinalEmptyIsTest1() { IPM pm = new PM("solution.right "); Assert.True(pm.FinalEmptyIs(1, LevelType.Property, "right")); Assert.True(pm.FinalEmptyIs(2, LevelType.RightOperandEmpty)); }
public void FinalEmptyIsTest2() { Assert.Throws <NotSupportedOperationException>(() => { IPM pm = new PM("solution.right = "); Assert.True(pm.FinalEmptyIs(1, LevelType.Property, "right")); }); Assert.Throws <NotSupportedOperationException>(() => { IPM pm = new PM("solution.right : "); Assert.True(pm.FinalEmptyIs(1, LevelType.Property, "right")); }); Assert.Throws <NotSupportedOperationException>(() => { IPM pm = new PM("solution.right . prop"); Assert.True(pm.FinalEmptyIs(1, LevelType.Property, "right")); }); Assert.Throws <NotSupportedOperationException>(() => { IPM pm = new PM("solution.right mixed data"); Assert.True(pm.FinalEmptyIs(1, LevelType.Property, "right")); }); }
public void FinalEmptyIsTest5() { IPM pm = new PM("left.solution(\"m(1)\", \"m()\", ')', \")\", \"(\")"); Assert.True(pm.Is(0, LevelType.Property, "left")); Assert.True(pm.FinalEmptyIs(1, LevelType.Method, "solution")); }
public void FinalEmptyIsTest4() { IPM pm = new PM("left.solution(\"test m()\")"); Assert.AreEqual(pm.Is(0, LevelType.Property, "left"), true); Assert.AreEqual(pm.FinalEmptyIs(1, LevelType.Method, "solution"), true); }
public void FinalEmptyIsTest2() { try { IPM pm = new PM("solution.right = "); Assert.AreEqual(pm.FinalEmptyIs(1, LevelType.Property, "right"), true); Assert.Fail("1"); } catch (Exception ex) { Assert.IsTrue(ex.GetType() == typeof(NotSupportedOperationException), ex.GetType().ToString()); } try { IPM pm = new PM("solution.right : "); Assert.AreEqual(pm.FinalEmptyIs(1, LevelType.Property, "right"), true); Assert.Fail("2"); } catch (Exception ex) { Assert.IsTrue(ex.GetType() == typeof(NotSupportedOperationException), ex.GetType().ToString()); } try { IPM pm = new PM("solution.right . prop"); Assert.AreEqual(pm.FinalEmptyIs(1, LevelType.Property, "right"), true); Assert.Fail("3"); } catch (Exception ex) { Assert.IsTrue(ex.GetType() == typeof(NotSupportedOperationException), ex.GetType().ToString()); } try { IPM pm = new PM("solution.right mixed data"); Assert.AreEqual(pm.FinalEmptyIs(1, LevelType.Property, "right"), true); Assert.Fail("4"); } catch (Exception ex) { Assert.IsTrue(ex.GetType() == typeof(NotSupportedOperationException), ex.GetType().ToString()); } }
public void FinalEmptyIsTest3() { IPM pm = new PM("left.solution.right"); Assert.False(pm.Is(0, LevelType.Property, "right")); Assert.False(pm.FinalEmptyIs(1, LevelType.Property, "right")); Assert.True(pm.Is(2, LevelType.Property, "right")); }
public void FinalEmptyIsTest3() { IPM pm = new PM("left.solution.right"); Assert.AreEqual(pm.Is(0, LevelType.Property, "right"), false); Assert.AreEqual(pm.FinalEmptyIs(1, LevelType.Property, "right"), false); Assert.AreEqual(pm.Is(2, LevelType.Property, "right"), true); }