Author: scabanovich
Date: 2009-02-19 08:22:16 -0500 (Thu, 19 Feb 2009)
New Revision: 13678
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamBigProjectTest.java
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SerializationTest.java
Log:
JBIDE-3818
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamBigProjectTest.java
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamBigProjectTest.java 2009-02-19
13:20:24 UTC (rev 13677)
+++
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamBigProjectTest.java 2009-02-19
13:22:16 UTC (rev 13678)
@@ -83,15 +83,15 @@
public void testBigProject() {
ISeamProject sp = getSeamProject();
- Set<ISeamComponent> cs = sp.getComponents();
- int components = cs.size();
+ ISeamComponent[] cs = sp.getComponents();
+ int components = cs.length;
if(components < 500) {
fail("Found only " + components + " components. Must be more than
500.");
}
SeamProject impl = (SeamProject)sp;
System.out.println("Full build of " + components + " components
completed in " + impl.fullBuildTime + "ms");
long time = impl.reload();
- System.out.println("Reloaded " + sp.getComponents().size() + "
components in " + time + "ms");
+ System.out.println("Reloaded " + sp.getComponents().length + "
components in " + time + "ms");
List<Long> statistics = impl.statistics;
impl.statistics = null;
assertTrue("Statistics contains less than 500 items", statistics.size() >=
500);
@@ -133,7 +133,7 @@
provider.dispose();
}
- private void generateLongXHTML(Set<ISeamComponent> cs) {
+ private void generateLongXHTML(ISeamComponent[] cs) {
StringBuffer sb = new StringBuffer();
IFolder webContent = project.getFolder("WebContent");
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SerializationTest.java
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SerializationTest.java 2009-02-19
13:20:24 UTC (rev 13677)
+++
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SerializationTest.java 2009-02-19
13:22:16 UTC (rev 13678)
@@ -65,7 +65,7 @@
public void testXMLSerialization() {
Element root = XMLUtilities.createDocumentElement("root");
ISeamProject seamProject = getSeamProject();
- Set<ISeamComponent> cs = seamProject.getComponents();
+ ISeamComponent[] cs = seamProject.getComponents();
for (ISeamComponent c: cs) {
Set<ISeamComponentDeclaration> ds = c.getAllDeclarations();
for (ISeamComponentDeclaration d: ds) {
@@ -92,7 +92,7 @@
root.removeChild(e);
}
}
- Set<ISeamFactory> fs = seamProject.getFactories();
+ ISeamFactory[] fs = seamProject.getFactories();
for (ISeamFactory f: fs) {
Properties context = new Properties();
context.put(SeamXMLConstants.ATTR_PATH, f.getSourcePath());
@@ -120,7 +120,7 @@
ISeamProject sp = getSeamProject();
long time = ((SeamProject)sp).reload();
- int components = sp.getComponents().size();
+ int components = sp.getComponents().length;
System.out.print("Reloaded " + components + " components in " +
time + " ms");
float timePerComponent = 1f * time / components;
@@ -131,14 +131,15 @@
public void testCleanBuild() {
ISeamProject sp = getSeamProject();
try {
- int components_1 = sp.getComponents().size();
+ boolean auto = ResourcesUtils.setBuildAutomatically(false);
+ sp.getProject().build(IncrementalProjectBuilder.FULL_BUILD, null);
+ int components_1 = sp.getComponents().length;
assertFalse(components_1 == 0);
- boolean auto = ResourcesUtils.setBuildAutomatically(false);
sp.getProject().build(IncrementalProjectBuilder.CLEAN_BUILD, null);
- int components_2 = sp.getComponents().size();
+ int components_2 = sp.getComponents().length;
assertTrue(components_2 == 0);
sp.getProject().build(IncrementalProjectBuilder.FULL_BUILD, null);
- int components_3 = sp.getComponents().size();
+ int components_3 = sp.getComponents().length;
assertEquals(components_1, components_3);
ResourcesUtils.setBuildAutomatically(auto);
Show replies by date