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

                Assert.NotNull(exception.InnerException);
                exception.InnerException.ValidateMessage("CouldNotResolveIdentifier", false, "Invalid");
            }
        }
        public void Exception_is_thrown_if_pregenerated_view_cache_returns_view_with_invalid_esql()
        {
            using (var context = new ContextWithInvalidView())
            {
                var exception =
                    Assert.Throws<EntityCommandCompilationException>(
                        () => context.Blogs.ToString());

                Assert.NotNull(exception.InnerException);
                exception.InnerException.ValidateMessage("CouldNotResolveIdentifier", false, "Invalid");
            }
        }