public void Throws_if_given_a_null_serializer_or_bad_name()
{
Assert.Equal(
"serializerFactory",
Assert.Throws<ArgumentNullException>(() => new DbConfiguration().SetMetadataAnnotationSerializer("Karl", null)).ParamName);
Assert.Equal(
Strings.ArgumentIsNullOrWhitespace("annotationName"),
Assert.Throws<ArgumentException>(
() => new DbConfiguration().SetMetadataAnnotationSerializer(null, () => null)).Message);
Assert.Equal(
Strings.ArgumentIsNullOrWhitespace("annotationName"),
Assert.Throws<ArgumentException>(
() => new DbConfiguration().SetMetadataAnnotationSerializer("", () => null)).Message);
Assert.Equal(
Strings.ArgumentIsNullOrWhitespace("annotationName"),
Assert.Throws<ArgumentException>(
() => new DbConfiguration().SetMetadataAnnotationSerializer(" ", () => null)).Message);
}