Example #1
0
 public void RequiresNonNullPage()
 {
     ContractAssert.NotNull(() => new DefaultPageExecutor().Execute(
                                null,
                                new Dictionary <string, object>(),
                                NullTrace.Instance), "page");
 }
Example #2
0
 public void RequiresNonNullTracer()
 {
     ContractAssert.NotNull(() => new DefaultPageExecutor().Execute(
                                new Mock <IRazorPage>().Object,
                                new Dictionary <string, object>(),
                                null), "tracer");
 }
Example #3
0
 public void RequiresNonNullPageActivator()
 {
     ContractAssert.NotNull(() => new RazorApplication(
                                null,
                                new Mock <IFileSystem>().Object,
                                "Foo",
                                new Mock <IRouter>().Object,
                                new Mock <ICompilationManager>().Object,
                                null,
                                new Mock <IPageExecutor>().Object,
                                new Mock <ITraceFactory>().Object), "activator");
 }
Example #4
0
 public void RequiresNonNullFileSystem()
 {
     ContractAssert.NotNull(() => new DefaultRouter(null), "fileSystem");
 }
 public void RequiresNonNullAction()
 {
     ContractAssert.NotNull(() => new DisposableAction(null), "act");
 }
 public void RequiresNonNullType()
 {
     ContractAssert.NotNull(() => new DefaultPageActivator().ActivatePage(null, NullTrace.Instance), "type");
 }
 public void RequiresNonNullTracer()
 {
     ContractAssert.NotNull(() => new DefaultPageActivator().ActivatePage(typeof(object), null), "tracer");
 }
 public void RequiresNonNullFile()
 {
     ContractAssert.NotNull(() => CreateManager().Compile(null, NullTrace.Instance), "file");
 }
 public void RequiresNonNullTracer()
 {
     ContractAssert.NotNull(() => CreateManager().Compile(new TestFile("a", "file", "text"), null), "tracer");
 }
 public void RequiresNonNullContentIdentifier()
 {
     ContractAssert.NotNull(() => new DefaultCompilationManager(null), "identifier");
 }
Example #11
0
 public void RequiresNonNullBuilder()
 {
     ContractAssert.NotNull(() => RazorExtensions.UseRazor(null, "Foo", "/Bar"), "builder");
 }
Example #12
0
 public void RequiresNonNullBuilder()
 {
     ContractAssert.NotNull(() => RazorExtensions.UseRazor(null, string.Empty), "builder");
 }
Example #13
0
 public void RequiresNonNullOrEmptyFileSystem()
 {
     ContractAssert.NotNull(() => RazorExtensions.UseRazor(new TestAppBuilder(), (IFileSystem)null), "fileSystem");
 }
Example #14
0
 public void RequiresNonNullBuilder()
 {
     ContractAssert.NotNull(() => RazorExtensions.UseRazor(null, new PhysicalFileSystem(@"C:\")), "builder");
 }