Exemplo n.º 1
0
        public void HasAnnotation_checks_arguments()
        {
            var configuration = new EntityTypeConfiguration <object>();

            Assert.Equal(
                Strings.ArgumentIsNullOrWhitespace("name"),
                Assert.Throws <ArgumentException>(() => configuration.HasAnnotation(null, null)).Message);

            Assert.Equal(
                Strings.ArgumentIsNullOrWhitespace("name"),
                Assert.Throws <ArgumentException>(() => configuration.HasAnnotation(" ", null)).Message);

            Assert.Equal(
                Strings.BadAnnotationName("Cheese:Pickle"),
                Assert.Throws <ArgumentException>(() => configuration.HasAnnotation("Cheese:Pickle", null)).Message);
        }