How to use the ariatemplates/Aria.dispose function in ariatemplates

To help you get started, we’ve selected a few ariatemplates examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ariatemplates / ariatemplates / test / aria / ext / filesgenerator / GeneratorTestCase.js View on Github external
$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");
        },
github ariatemplates / ariatemplates / test / aria / ext / filesgenerator / GeneratorTestCase.js View on Github external
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");
        },
github ariatemplates / ariatemplates / test / aria / ext / filesgenerator / GeneratorTestCase.js View on Github external
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();
        },
github ariatemplates / ariatemplates / test / aria / core / TplClassLoaderErrorTestCase.js View on Github external
cleanLogicalPath : function (logicalPath) {
            ariaCoreDownloadMgr.clearFile(logicalPath);
            delete require.cache[logicalPath];
            var classpath = logicalPath.replace(/\.[^\/]+$/,"").replace(/\//g,".");
            Aria.dispose(classpath);
            Aria.cleanGetClassRefCache(classpath);
        },
github ariatemplates / ariatemplates / test / aria / ext / filesgenerator / GeneratorTestCase.js View on Github external
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");
        },
github ariatemplates / ariatemplates / test / aria / core / ResMgr2TestCase.js View on Github external
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);
        },
github ariatemplates / ariatemplates / test / aria / ext / filesgenerator / GeneratorTestCase.js View on Github external
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");
        },
github ariatemplates / ariatemplates / test / aria / ext / filesgenerator / GeneratorTestCase.js View on Github external
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");
        },