org.fabric3.maven.test.TestSuiteFactoryImpl Maven / Gradle / Ivy
/*
* Fabric3
* Copyright ? 2008 Metaform Systems Limited
*
* This proprietary software may be used only connection with the Fabric3 license
* (the ?License?), a copy of which is included in the software or may be
* obtained at: http://www.metaformsystems.com/licenses/license.html.
* Software distributed under the License is distributed on an ?as is? basis,
* without warranties or conditions of any kind. See the License for the
* specific language governing permissions and limitations of use of the software.
* This software is distributed in conjunction with other software licensed under
* different terms. See the separate licenses for those programs included in the
* distribution for the permitted and restricted uses of such software.
*
*/
package org.fabric3.maven.test;
import java.util.Map;
import org.apache.maven.surefire.suite.SurefireTestSuite;
import org.osoa.sca.annotations.Reference;
import org.fabric3.maven.TestSuiteFactory;
import org.fabric3.spi.wire.Wire;
import org.fabric3.test.spi.TestWireHolder;
/**
* @version $Revision$ $Date$
*/
public class TestSuiteFactoryImpl implements TestSuiteFactory {
private TestWireHolder holder;
public TestSuiteFactoryImpl(@Reference TestWireHolder holder) {
this.holder = holder;
}
public SurefireTestSuite createTestSuite() {
// get wires to test operations generated by test extensions
SCATestSuite suite = new SCATestSuite();
for (Map.Entry entry : holder.getWires().entrySet()) {
SCATestSet testSet = new SCATestSet(entry.getKey(), entry.getValue());
suite.add(testSet);
}
return suite;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy