public void PinToTest2() { Assert.Throws <ArgumentException>(() => { IPM pm = new PM("left.solution.right"); pm.PinTo(100); }); Assert.Throws <ArgumentException>(() => { IPM pm = new PM("left.solution.right"); pm.PinTo(-1); }); Assert.Throws <ArgumentException>(() => { IPM pm = new PM("left.solution.right"); //4 pm.PinTo(4); }); Assert.Throws <ArgumentException>(() => { IPM pm = new PM("left.solution.right"); //4 pm.PinTo(1); pm.PinTo(2); pm.PinTo(1); }); }
public void IsDataTest1() { IPM pm = new PM("pname . m1(true, 123).right = true"); Assert.True(pm.IsData("pname")); Assert.False(pm.IsData("pname ")); pm.PinTo(1); Assert.True(pm.IsData("m1")); pm.PinTo(1); Assert.True(pm.IsData("right")); pm.PinTo(1); Assert.True(pm.IsData(" true")); }
public void PinToTest1() { IPM pm = new PM("left.solution.right"); Assert.Equal(4, pm.Levels.Count); pm.PinTo(1); Assert.Equal(3, pm.Levels.Count); Assert.True(pm.Is(0, LevelType.Property, "solution")); Assert.True(pm.Is(1, LevelType.Property, "right")); Assert.True(pm.Is(2, LevelType.RightOperandEmpty, null)); pm.PinTo(2); Assert.True(pm.Is(0, LevelType.RightOperandEmpty, null)); }
public void FirstLevelTest1() { IPM pm = new PM("left.solution.right"); Assert.Equal(pm.FirstLevel.Data, pm.Levels[0].Data); Assert.Equal(pm.FirstLevel.Type, pm.Levels[0].Type); pm.PinTo(2); Assert.Equal(pm.FirstLevel.Data, pm.Levels[0].Data); Assert.Equal(pm.FirstLevel.Type, pm.Levels[0].Type); }