public void ResolveWithNullSubbranch() { // Setup var catalog = new DirectoryCatalog(Assembly.GetExecutingAssembly(), "TestViews"); // Execute var view = catalog.Resolve(a_sub: null, a_typeName: "TestView1"); }
public void ConstructDirectoryViewCatalog() { // Execute var catalog = new DirectoryCatalog(Assembly.GetExecutingAssembly(), "Views"); // Assert Assert.AreEqual("SimpleMvc.Test.Views", catalog.Namespace); }
public void ResolveWithNullName() { // Setup var catalog = new DirectoryCatalog(Assembly.GetExecutingAssembly(), "TestViews"); // Assert var view = catalog.Resolve(a_catalogName:null); }
public void Resolve() { // Setup var catalog = new DirectoryCatalog(Assembly.GetExecutingAssembly(), "TestViews"); // Execute var view = catalog.Resolve("TestView1"); // Assert Assert.IsTrue(view is TestView1); }
public void RegisterViewCatalog() { // Setup var mvc = new MvcEngine(); var viewCatalog = new DirectoryCatalog(Assembly.GetExecutingAssembly(), "Views", "", typeof (object)); // Execute var result = mvc.RegisterViewCatalog(viewCatalog); // Assert Assert.AreSame(mvc, result); }
public void RegisterControllerCatalog() { // Setup var mvc = new MvcEngine(); var catalogController = new DirectoryCatalog(Assembly.GetExecutingAssembly(), "Controllers"); // Execute var result = mvc.RegisterControllerCatalog(catalogController); // Assert Assert.AreSame(mvc, result); }
public void ToTypeNameWithNull() { // Setup var catalog = new DirectoryCatalog(Assembly.GetExecutingAssembly(), "TestViews", "View"); // Execute var typeName = catalog.ToTypeName(a_catalogName: null); }
public void ToTypeName() { // Setup var catalog = new DirectoryCatalog(Assembly.GetExecutingAssembly(), "TestViews", "View"); // Execute var typeName = catalog.ToTypeName("Test"); // Assert Assert.AreEqual("TestView", typeName); }
public void ToCatalogNameWithIncorrectSuffix() { // Setup var catalog = new DirectoryCatalog(Assembly.GetExecutingAssembly(), "TestViews", "View"); // Execute var catalogName = catalog.ToCatalogName("TestXiew"); // Assert Assert.AreEqual("TestXiew", catalogName); }
public void ResolveWithSubbranchWithNullName() { // Setup var catalog = new DirectoryCatalog(Assembly.GetExecutingAssembly(), "TestViews"); // Execute var view = catalog.Resolve(a_sub: "TestController", a_typeName: null); }