public void Test_configurationToString() { var crs = new CaseResultSet <int[], string> (); crs.addTest(new int[0], "[]"); crs.addTest(new int[] { 1 }, "[ 1 ]"); crs.addTest(new int[] { 1, 2, 3 }, "[ 1, 2, 3 ]"); for (int i = 0; i < crs.Count; i++) { Assert.That(PoslTools.configurationToString(crs.GetCase(i)), Is.EqualTo(crs.GetResult(i))); } }
public void Test_generateMonotonyN() { var crs = new CaseResultSet <int, int[]> (); crs.addTest(0, null); crs.addTest(1, new int[] { 0 }); crs.addTest(3, new int[] { 0, 1, 2 }); for (int i = 0; i < crs.Count; i++) { Assert.That(PoslTools.generateMonotony(crs.GetCase(i)), Is.EqualTo(crs.GetResult(i))); } }
public void Test_isANumber() { var crs = new CaseResultSet <string, bool> (); crs.addTest("123", true); crs.addTest("12e4", false); crs.addTest("123456789012345678901234567890123", false); for (int i = 0; i < crs.Count; i++) { Assert.That(PoslTools.isANumber(crs.GetCase(i)), Is.EqualTo(crs.GetResult(i))); } }