Created
June 8, 2012 15:40
-
-
Save toddpi314/2896227 to your computer and use it in GitHub Desktop.
Rich_Domain_Components_UnloadTest
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test("Component Unload Tests", function() { | |
var componentTestCount = 10; | |
var components = [] | |
for (var i = 0; i <= componentTestCount - 1; i++) { | |
components.push(new DeepElement.ThreeOneFour.Component()); | |
} | |
var comonentLoader = new DeepElement.ThreeOneFour.Helpers.ComponentLoader( | |
components); | |
comonentLoader.load( | |
function() { | |
comonentLoader.unload(function() { | |
var unloadedComponents = 0; | |
for (var i = 0; i <= components.length - 1; i++) { | |
var component = components[i]; | |
if (!component.getLoaded()) unloadedComponents++; | |
} | |
ok( | |
unloadedComponents == componentTestCount, "Problem unloading the " + componentTestCount + " test components"); | |
}); | |
}, function() { | |
ok(false, "Problem loading the " + componentTestCount + " test components"); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment