public void WithNullString_ThrowsArgumentNullException() { if (Runtime.OS != Swan.OperatingSystem.Windows) { Assert.Ignore("Ignored"); } Assert.Throws <ArgumentNullException>(() => NullString.ToSafeFilename()); }
public void WithNullString_ThrowsArgumentNullException() { Assert.Throws <ArgumentNullException>(() => NullString.RemoveControlCharsExcept(null)); }
public JsonHttpResponseValidation(HttpTextResponse response) { if (response == null) { throw AssertionExceptionFactory.Create("Expected response to be an instance, but got NULL."); } const string expectedContentType = "application/json"; if (response.ContentType != expectedContentType) { throw AssertionExceptionFactory.CreateForResponse(response, "Expected response content type to be '{0}', but got '{1}'.", expectedContentType, NullString.IfNull(response.ContentType)); } Response = response; }
public void WithNullHex_ThrowsArgumentNullException() { Assert.Throws <ArgumentNullException>(() => NullString.ConvertHexadecimalToBytes()); }