public void FinalIsTest1() { IPM pm = new PM("left.solution.right"); Assert.Equal(4, pm.Levels.Count); Assert.True(pm.FinalIs(2, LevelType.Property, "right")); Assert.True(pm.FinalIs(3, LevelType.RightOperandEmpty)); }
public void FinalIsTest1() { IPM pm = new PM("left.solution.right"); Assert.AreEqual(pm.Levels.Count, 4); Assert.AreEqual(pm.FinalIs(2, LevelType.Property, "right"), true); Assert.AreEqual(pm.FinalIs(3, LevelType.RightOperandEmpty), true); }
public void FinalIsTest5() { IPM pm = new PM("left.solution(\" (a, b) \").right"); Assert.True(pm.Is(0, LevelType.Property, "left")); Assert.True(pm.Is(1, LevelType.Method, "solution")); Assert.True(pm.FinalIs(2, LevelType.Property, "right")); }
public void FinalIsTest3() { IPM pm = new PM("left.solution.right"); Assert.False(pm.Is(0, LevelType.Property, "right")); Assert.False(pm.FinalIs(1, LevelType.Property, "right")); Assert.True(pm.Is(2, LevelType.Property, "right")); }
public void FinalIsTest4() { IPM pm = new PM("left.solution().right"); Assert.AreEqual(pm.Is(0, LevelType.Property, "left"), true); Assert.AreEqual(pm.Is(1, LevelType.Method, "solution"), true); Assert.AreEqual(pm.FinalIs(2, LevelType.Property, "right"), true); }
public void FinalIsTest3() { IPM pm = new PM("left.solution.right"); Assert.AreEqual(pm.Is(0, LevelType.Property, "right"), false); Assert.AreEqual(pm.FinalIs(1, LevelType.Property, "right"), false); Assert.AreEqual(pm.Is(2, LevelType.Property, "right"), true); }
public void FinalIsTest2() { Assert.Throws <NotSupportedOperationException>(() => { IPM pm = new PM("left.solution.right"); Assert.True(pm.FinalIs(1, LevelType.Property, "solution")); }); Assert.Throws <NotSupportedOperationException>(() => { IPM pm = new PM("left.solution.right"); Assert.True(pm.FinalIs(LevelType.Property, "left")); }); }
public void FinalIsTest2() { try { IPM pm = new PM("left.solution.right"); Assert.AreEqual(pm.FinalIs(1, LevelType.Property, "solution"), true); Assert.Fail("1"); } catch (Exception ex) { Assert.IsTrue(ex.GetType() == typeof(NotSupportedOperationException), ex.GetType().ToString()); } try { IPM pm = new PM("left.solution.right"); Assert.AreEqual(pm.FinalIs(LevelType.Property, "left"), true); Assert.Fail("2"); } catch (Exception ex) { Assert.IsTrue(ex.GetType() == typeof(NotSupportedOperationException), ex.GetType().ToString()); } }