public ControllerTester HasImportForFile(string relPath) { var imports = ImportManager.FromControllerContext(_context).GetImports(); Assert.IsTrue(imports.Any(imp => imp.FromRelativePath == relPath)); return(this); }
public MvcControllerTextTemplate(ControllerContext context, ScriptExtensionsFactory extensionsFactory) { _context = context; _scriptExtensions = extensionsFactory; _imports = ImportManager.FromControllerContext(context); _formatter = new TypeScriptTypeFormatter(context.TypeCollection, new ModuleTypePrefixResolver(_imports)); _postScriptExtensions = _scriptExtensions.CreatePostControllerScript(context); }