Esempio n. 1
0
        public void Exception_is_thrown_if_pregenerated_view_cache_mapping_hash_does_not_match()
        {
            using (var context = new ContextWithHashMissmatch())
            {
                var exception =
                    Assert.Throws <EntityCommandCompilationException>(
                        () => context.Blogs.ToString());

                Assert.NotNull(exception.InnerException);
                exception.InnerException.ValidateMessage("ViewGen_HashOnMappingClosure_Not_Matching", "ViewCacheWithHashMissmatch");
            }
        }
        public void Exception_is_thrown_if_pregenerated_view_cache_mapping_hash_does_not_match()
        {
            using (var context = new ContextWithHashMissmatch())
            {
                var exception =
                    Assert.Throws<EntityCommandCompilationException>(
                        () => context.Blogs.ToString());

                Assert.NotNull(exception.InnerException);
                exception.InnerException.ValidateMessage("ViewGen_HashOnMappingClosure_Not_Matching", "ViewCacheWithHashMissmatch");
            }
        }