Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
$classpath : "my.great.test.InterfaceDefinition",
$extends : "aria.modules.urlService.IUrlService"
});
this.assertEquals(fileInfo.type, "interface", "Wrong type of file was generated");
this.assertEquals(fileInfo.classpath, "my.great.test.InterfaceDefinition", "Incorrect classpath parsed");
var logicalPath = Aria.getLogicalPath(fileInfo.classpath, ".js", true);
ariaCoreDownloadMgr.loadFileContent(logicalPath, fileInfo.content);
try {
require(logicalPath);
} catch (e) {
this.assertTrue(false, "Eval'ing the generated interface failed");
}
Aria.dispose("my.great.test.InterfaceDefinition");
},
moduleControllerLoaded : function (res) {
this.assertTrue(ariaUtilsType.isFunction(aria.my.great.test.IModuleDefinition));
this.assertTrue(ariaUtilsType.isFunction(aria.my.great.test.IModuleDefinitionFlow));
this.assertTrue(ariaUtilsType.isFunction(aria.my.great.test.ModuleDefinitionFlow));
this.assertTrue(ariaUtilsType.isFunction(aria.my.great.test.ModuleDefinition));
this.assertTrue(typeof res.moduleCtrl == "object", "Instantiating generated Module didn't produce an object");
this.assertTrue(ariaUtilsType.isInstanceOf(res.moduleCtrlPrivate, "aria.my.great.test.ModuleDefinition"), "Instantiated object is not of the correct type");
this.assertTrue(ariaUtilsType.isInstanceOf(res.moduleCtrl, "aria.my.great.test.IModuleDefinition"), "Instantiated object is not of the correct type");
res.moduleCtrlPrivate.$dispose();
Aria.dispose("aria.my.great.test.ModuleDefinition");
Aria.dispose("aria.my.great.test.IModuleDefinition");
Aria.dispose("aria.my.great.test.IModuleDefinitionFlow");
Aria.dispose("aria.my.great.test.ModuleDefinitionFlow");
this.notifyTestEnd("testAsyncModuleControllerClass");
},
this.assertEquals(fileInfo.type, "class", "Wrong type of file was generated");
this.assertEquals(fileInfo.classpath, "test.my.great.test.ClassDefinition", "Incorrect classpath parsed");
try {
eval(fileInfo.content);
} catch (e) {
this.assertTrue(false, "Eval'ing the generated class failed");
}
var o = new test.my.great.test.ClassDefinition();
this.assertTrue(typeof o == "object", "Instantiating generated class didn't produce an object");
this.assertTrue(ariaUtilsType.isInstanceOf(o, "test.my.great.test.ClassDefinition"), "Instantiated object is not of the correct type");
Aria.dispose("test.my.great.test.ClassDefinition");
o.$dispose();
},
cleanLogicalPath : function (logicalPath) {
ariaCoreDownloadMgr.clearFile(logicalPath);
delete require.cache[logicalPath];
var classpath = logicalPath.replace(/\.[^\/]+$/,"").replace(/\//g,".");
Aria.dispose(classpath);
Aria.cleanGetClassRefCache(classpath);
},
moduleControllerLoaded : function (res) {
this.assertTrue(ariaUtilsType.isFunction(aria.my.great.test.IModuleDefinition));
this.assertTrue(ariaUtilsType.isFunction(aria.my.great.test.IModuleDefinitionFlow));
this.assertTrue(ariaUtilsType.isFunction(aria.my.great.test.ModuleDefinitionFlow));
this.assertTrue(ariaUtilsType.isFunction(aria.my.great.test.ModuleDefinition));
this.assertTrue(typeof res.moduleCtrl == "object", "Instantiating generated Module didn't produce an object");
this.assertTrue(ariaUtilsType.isInstanceOf(res.moduleCtrlPrivate, "aria.my.great.test.ModuleDefinition"), "Instantiated object is not of the correct type");
this.assertTrue(ariaUtilsType.isInstanceOf(res.moduleCtrl, "aria.my.great.test.IModuleDefinition"), "Instantiated object is not of the correct type");
res.moduleCtrlPrivate.$dispose();
Aria.dispose("aria.my.great.test.ModuleDefinition");
Aria.dispose("aria.my.great.test.IModuleDefinition");
Aria.dispose("aria.my.great.test.IModuleDefinitionFlow");
Aria.dispose("aria.my.great.test.ModuleDefinitionFlow");
this.notifyTestEnd("testAsyncModuleControllerClass");
},
ariaCoreResMgr.loadResource("myModule5", "test/aria/core/testResMgr/MyRes5").then(function (res) {
self.assertEquals(res.value, "testAsyncCase5");
self.assertEquals(res, Aria.$global.test.aria.core.testResMgr.MyRes5);
var locale = aria.core.ResMgr.getResourceLocale("test.aria.core.testResMgr.MyRes5");
self.assertEquals(locale, "fr_FR");
Aria.dispose(res);
self.notifyTestEnd();
}, this.handleAsyncTestError);
},
moduleControllerLoaded : function (res) {
this.assertTrue(ariaUtilsType.isFunction(aria.my.great.test.IModuleDefinition));
this.assertTrue(ariaUtilsType.isFunction(aria.my.great.test.IModuleDefinitionFlow));
this.assertTrue(ariaUtilsType.isFunction(aria.my.great.test.ModuleDefinitionFlow));
this.assertTrue(ariaUtilsType.isFunction(aria.my.great.test.ModuleDefinition));
this.assertTrue(typeof res.moduleCtrl == "object", "Instantiating generated Module didn't produce an object");
this.assertTrue(ariaUtilsType.isInstanceOf(res.moduleCtrlPrivate, "aria.my.great.test.ModuleDefinition"), "Instantiated object is not of the correct type");
this.assertTrue(ariaUtilsType.isInstanceOf(res.moduleCtrl, "aria.my.great.test.IModuleDefinition"), "Instantiated object is not of the correct type");
res.moduleCtrlPrivate.$dispose();
Aria.dispose("aria.my.great.test.ModuleDefinition");
Aria.dispose("aria.my.great.test.IModuleDefinition");
Aria.dispose("aria.my.great.test.IModuleDefinitionFlow");
Aria.dispose("aria.my.great.test.ModuleDefinitionFlow");
this.notifyTestEnd("testAsyncModuleControllerClass");
},
moduleControllerLoaded : function (res) {
this.assertTrue(ariaUtilsType.isFunction(aria.my.great.test.IModuleDefinition));
this.assertTrue(ariaUtilsType.isFunction(aria.my.great.test.IModuleDefinitionFlow));
this.assertTrue(ariaUtilsType.isFunction(aria.my.great.test.ModuleDefinitionFlow));
this.assertTrue(ariaUtilsType.isFunction(aria.my.great.test.ModuleDefinition));
this.assertTrue(typeof res.moduleCtrl == "object", "Instantiating generated Module didn't produce an object");
this.assertTrue(ariaUtilsType.isInstanceOf(res.moduleCtrlPrivate, "aria.my.great.test.ModuleDefinition"), "Instantiated object is not of the correct type");
this.assertTrue(ariaUtilsType.isInstanceOf(res.moduleCtrl, "aria.my.great.test.IModuleDefinition"), "Instantiated object is not of the correct type");
res.moduleCtrlPrivate.$dispose();
Aria.dispose("aria.my.great.test.ModuleDefinition");
Aria.dispose("aria.my.great.test.IModuleDefinition");
Aria.dispose("aria.my.great.test.IModuleDefinitionFlow");
Aria.dispose("aria.my.great.test.ModuleDefinitionFlow");
this.notifyTestEnd("testAsyncModuleControllerClass");
},