public void LocalizedValidation_ThrowsArgumentException_When_ResourceTypeNull() { var foo = new ResourceTypeNull(); using (SwitchUICulture(CultureInfo.CreateSpecificCulture("en-US"))) { try { runner.IsValid(foo); Assert.Fail("Should have gotten exception"); } catch (CustomAttributeFormatException ex) { ArgumentException argumentException = (ArgumentException)ex.InnerException.InnerException; Assert.AreEqual("Value cannot be null.\r\nParameter name: value", argumentException.Message); } } }
public void LocalizedValidation_ThrowsArgumentException_When_ResourceTypeNull() { var foo = new ResourceTypeNull(); using (SwitchUICulture(CultureInfo.CreateSpecificCulture("en-US"))) { try { runner.IsValid(foo); Assert.Fail("Should have gotten exception"); } catch (CustomAttributeFormatException ex) { ArgumentException argumentException = (ArgumentException)ex.InnerException.InnerException; Assert.AreEqual("Value cannot be null.\r\nParameter name: value", argumentException.Message); } } }