private static AssertionException wrongTypeError(String msgPrefix, ICell expectedCell, CellValue actualValue) { return new AssertionException(msgPrefix + " Result type mismatch. Evaluated result was " + actualValue.FormatAsString() + " but the expected result was " + formatValue(expectedCell) ); }
private static void ConfirmErrorResult(String msgPrefix, int expectedErrorCode, CellValue actual) { if (actual.CellType != CellType.ERROR) { throw new AssertionException(msgPrefix + " Expected cell error (" + ErrorEval.GetText(expectedErrorCode) + ") but actual value was " + actual.FormatAsString()); } if (expectedErrorCode != actual.ErrorValue) { throw new AssertionException(msgPrefix + " Expected cell error code (" + ErrorEval.GetText(expectedErrorCode) + ") but actual error code was (" + ErrorEval.GetText(actual.ErrorValue) + ")"); } }