public void CheckForNullsNonNullStringInputDoesNotThrowArgumentNullException() { const string verifying = "I'm not null"; var validator = new InputValidator(); Assert.DoesNotThrow(() => validator.CheckForNulls(verifying, nameof(verifying))); }
public void CheckForNullsNonNullIntInputDoesNotThrowArgumentNullException() { const int verifying = 0; var validator = new InputValidator(); Assert.DoesNotThrow(() => validator.CheckForNulls(verifying, nameof(verifying))); }
public void CheckForNullsNonNullListInputDoesNotThrowArgumentNullException() { List <string> verifying = new List <string>() { "I'm not null" }; var validator = new InputValidator(); Assert.DoesNotThrow(() => validator.CheckForNulls(verifying, nameof(verifying))); }
public void CheckForNullsNullInputThrowsArgumentNullException() { const string expected = "Input Parameter (verifying) was null or empty (Parameter 'verifying')"; const object verifying = null; var validator = new InputValidator(); Assert.Multiple(() => { var exception = Assert.Throws <ArgumentNullException>(() => validator.CheckForNulls(verifying, nameof(verifying))); Assert.AreEqual(expected, exception.Message); }); }