Пример #1
0
 public void Compiling_the_model_throws_when_using_bad_mapping_that_is_not_caught_by_first_pass_CSDL_validation()
 {
     using (var context = new InvalidMappingContext())
     {
         Assert.Throws <ModelValidationException>(() => context.Database.Initialize(force: false));
     }
 }
Пример #2
0
 public void WriteEdmx_throws_when_using_bad_mapping_that_is_not_caught_by_first_pass_CSDL_validation()
 {
     using (var context = new InvalidMappingContext())
     {
         Assert.Throws <ModelValidationException>(
             () => EdmxWriter.WriteEdmx(context, XmlWriter.Create(Stream.Null)));
     }
 }
 public void Compiling_the_model_throws_when_using_bad_mapping_that_is_not_caught_by_first_pass_CSDL_validation()
 {
     using (var context = new InvalidMappingContext())
     {
         Assert.Throws<ModelValidationException>(() => context.Database.Initialize(force: false));
     }
 }
 public void WriteEdmx_throws_when_using_bad_mapping_that_is_not_caught_by_first_pass_CSDL_validation()
 {
     using (var context = new InvalidMappingContext())
     {
         Assert.Throws<ModelValidationException>(
             () => EdmxWriter.WriteEdmx(context, XmlWriter.Create(Stream.Null)));
     }
 }