public void FormatPropertyForClientValidation_WithInvalidPropertyName_Throws(string property) { // Arrange var expected = "Value cannot be null or empty."; // Act & Assert ExceptionAssert.ThrowsArgument( () => RemoteAttribute.FormatPropertyForClientValidation(property), "property", expected); }
public void FormatPropertyForClientValidation_WithInvalidPropertyName_Throws(string property) { // Arrange var expected = "Value cannot be null or empty." + Environment.NewLine + "Parameter name: property"; // Act & Assert var exception = Assert.Throws <ArgumentException>( "property", () => RemoteAttribute.FormatPropertyForClientValidation(property)); Assert.Equal(expected, exception.Message); }