System.Data.Entity.DbConfigurationTests.SetMetadataAnnotationSerializer.Throws_if_given_a_null_serializer_or_bad_name C# (CSharp) Method

Throws_if_given_a_null_serializer_or_bad_name() private method

private Throws_if_given_a_null_serializer_or_bad_name ( ) : void
return void
            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);
            }