public void testNonEmptyWithCustomMessage() { try { SanityCheck.nonEmpty(" ", "Parameter '{0}' must be valorised and only spaces are not accepted", "testParam"); Assert.Fail("empty value has not been detected"); } catch (ArgumentException ae) { Assert.AreEqual( "Parameter 'testParam' must be valorised and only spaces are not accepted", ae.Message); } }
public void testNonEmptyNoTrim() { SanityCheck.NonEmpty(" ", "empty-string", false); }