Created
June 8, 2012 15:31
-
-
Save toddpi314/2896175 to your computer and use it in GitHub Desktop.
Rich_Domain_Components_LoadTest
This file contains 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 Load 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() { | |
var loadedComponents = 0; | |
for (var i = 0; i <= components.length - 1; i++) { | |
var component = components[i]; | |
if (component.getLoaded()) loadedComponents++; | |
} | |
ok(loadedComponents == componentTestCount, "Problem loading 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