本文整理汇总了Java中junit.framework.TestSuite类的典型用法代码示例。如果您正苦于以下问题:Java TestSuite类的具体用法?Java TestSuite怎么用?Java TestSuite使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TestSuite类属于junit.framework包,在下文中一共展示了TestSuite类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: allTests
import junit.framework.TestSuite; //导入依赖的package包/类
public Test allTests() {
TestSuite suite = new TestSuite("java.util Maps");
suite.addTest(testsForCheckedMap());
suite.addTest(testsForCheckedNavigableMap());
suite.addTest(testsForCheckedSortedMap());
suite.addTest(testsForEmptyMap());
suite.addTest(testsForEmptyNavigableMap());
suite.addTest(testsForEmptySortedMap());
suite.addTest(testsForSingletonMap());
suite.addTest(testsForHashMap());
suite.addTest(testsForHashtable());
suite.addTest(testsForLinkedHashMap());
suite.addTest(testsForSynchronizedNavigableMap());
suite.addTest(testsForTreeMapNatural());
suite.addTest(testsForTreeMapWithComparator());
suite.addTest(testsForUnmodifiableMap());
suite.addTest(testsForUnmodifiableNavigableMap());
suite.addTest(testsForUnmodifiableSortedMap());
suite.addTest(testsForEnumMap());
suite.addTest(testsForConcurrentHashMap());
suite.addTest(testsForConcurrentSkipListMapNatural());
suite.addTest(testsForConcurrentSkipListMapWithComparator());
return suite;
}
示例2: makeSuiteForTesterClass
import junit.framework.TestSuite; //导入依赖的package包/类
protected TestSuite makeSuiteForTesterClass(Class<? extends AbstractTester<?>> testerClass) {
final TestSuite candidateTests = new TestSuite(testerClass);
final TestSuite suite = filterSuite(candidateTests);
Enumeration<?> allTests = suite.tests();
while (allTests.hasMoreElements()) {
Object test = allTests.nextElement();
if (test instanceof AbstractTester) {
@SuppressWarnings("unchecked")
AbstractTester<? super G> tester = (AbstractTester<? super G>) test;
tester.init(subjectGenerator, name, setUp, tearDown);
}
}
return suite;
}
示例3: createReserializedSuite
import junit.framework.TestSuite; //导入依赖的package包/类
private TestSuite createReserializedSuite(SortedMultisetTestSuiteBuilder<E> parentBuilder) {
final TestMultisetGenerator<E> delegate =
(TestMultisetGenerator<E>) parentBuilder.getSubjectGenerator();
Set<Feature<?>> features = new HashSet<Feature<?>>();
features.addAll(parentBuilder.getFeatures());
features.remove(SERIALIZABLE);
features.remove(SERIALIZABLE_INCLUDING_VIEWS);
return SortedMultisetTestSuiteBuilder.using(
new ForwardingTestMultisetGenerator<E>(delegate) {
@Override
public SortedMultiset<E> create(Object... entries) {
return SerializableTester.reserialize(((SortedMultiset<E>) super.create(entries)));
}
})
.named(parentBuilder.getName() + " reserialized")
.withFeatures(features)
.suppressing(parentBuilder.getSuppressedTests())
.createTestSuite();
}
示例4: iterateTests
import junit.framework.TestSuite; //导入依赖的package包/类
private void iterateTests(TestResult result, StringBuffer times, TestSuite suite, AtomicLong min, AtomicLong max) {
Enumeration en = suite.tests();
while (en.hasMoreElements()) {
Test t = (Test)en.nextElement();
if (t instanceof Callable) {
try {
Long v = (Long)((Callable) t).call();
long time = v.longValue();
if (time < min.longValue()) {
min.set(time);
}
if (time > max.longValue()) {
max.set(time);
}
// append(t.toString()).append(" value: ")
times.append("Run: ").append(v).append('\n');
} catch (Exception ex) {
result.addError(this, ex);
}
}
if (t instanceof TestSuite) {
iterateTests(result, times, (TestSuite)t, min, max);
}
}
}
示例5: computeMultimapAsMapGetTestSuite
import junit.framework.TestSuite; //导入依赖的package包/类
TestSuite computeMultimapAsMapGetTestSuite(
FeatureSpecificTestSuiteBuilder<
?, ? extends OneSizeTestContainerGenerator<M, Map.Entry<K, V>>>
parentBuilder) {
Set<Feature<?>> features = computeMultimapAsMapGetFeatures(parentBuilder.getFeatures());
if (Collections.disjoint(features, EnumSet.allOf(CollectionSize.class))) {
return new TestSuite();
} else {
return CollectionTestSuiteBuilder.using(
new MultimapAsMapGetGenerator<K, V, M>(parentBuilder.getSubjectGenerator()))
.withFeatures(features)
.named(parentBuilder.getName() + ".asMap[].get[key]")
.suppressing(parentBuilder.getSuppressedTests())
.createTestSuite();
}
}
示例6: suite
import junit.framework.TestSuite; //导入依赖的package包/类
/**
* Required by JUnit
*/
public static TestSuite suite() {
return new OrderedTestSuite(SSTestGenericSourceControl.class,
new String[]{
"test_getChangesSinceHandlesFirstRun",
"test_getChangesSince",
"test_label",
"test_checkoutLatest",
"test_syncToChangeList"
});
}
示例7: suite
import junit.framework.TestSuite; //导入依赖的package包/类
public static TestSuite suite() {
TestSuite result = new TestSuite();
result.addTest( WebPageTest.suite() );
result.addTest( WebLinkTest.suite() );
result.addTest( WebImageTest.suite() );
result.addTest( HtmlTablesTest.suite() );
result.addTest( WebFormTest.suite() );
result.addTest( WebFrameTest.suite() );
result.addTest( WebWindowTest.suite() );
result.addTest( RequestTargetTest.suite() );
result.addTest( FormParametersTest.suite() );
result.addTest( FormSubmitTest.suite() );
result.addTest( Base64Test.suite() );
result.addTest( PseudoServerTest.suite() );
result.addTest( WebClientTest.suite() );
result.addTest( MessageBodyRequestTest.suite() );
result.addTest( WebAppletTest.suite() );
result.addTest( CookieTest.suite() );
result.addTest( ParsingTestSuite.suite() );
result.addTest( NormalizeURLTest.suite() );
if (HTMLParserFactory.getHTMLParser().getClass().getName().indexOf("NekoHTML") >= 0) result.addTest( NekoEnhancedScriptingTest.suite() );
addOptionalTestCase( result, "com.meterware.httpunit.XMLPageTest" );
addOptionalTestCase( result, "com.meterware.httpunit.FileUploadTest" );
addOptionalTestCase( result, "com.meterware.httpunit.javascript.JavaScriptTestSuite" );
addOptionalTestCase( result, "com.meterware.servletunit.ServletUnitSuite" );
return result;
}
示例8: createTestSuite
import junit.framework.TestSuite; //导入依赖的package包/类
@Override
public TestSuite createTestSuite() {
if (!getFeatures().contains(KNOWN_ORDER)) {
List<Feature<?>> features = Helpers.copyToList(getFeatures());
features.add(KNOWN_ORDER);
withFeatures(features);
}
return super.createTestSuite();
}
示例9: suiteForString
import junit.framework.TestSuite; //导入依赖的package包/类
private static TestSuite suiteForString(String name, ByteSinkFactory factory,
String string, String desc) {
byte[] bytes = string.getBytes(Charsets.UTF_8);
TestSuite suite = suiteForBytes(name, factory, desc, bytes);
CharSinkFactory charSinkFactory = SourceSinkFactories.asCharSinkFactory(factory);
suite.addTest(CharSinkTester.suiteForString(name + ".asCharSink[Charset]", charSinkFactory,
string, desc));
return suite;
}
示例10: computeValuesTestSuite
import junit.framework.TestSuite; //导入依赖的package包/类
TestSuite computeValuesTestSuite(
FeatureSpecificTestSuiteBuilder<
?, ? extends OneSizeTestContainerGenerator<M, Map.Entry<K, V>>>
parentBuilder) {
return CollectionTestSuiteBuilder.using(
new ValuesGenerator<K, V, M>(parentBuilder.getSubjectGenerator()))
.withFeatures(computeValuesFeatures(parentBuilder.getFeatures()))
.named(parentBuilder.getName() + ".values")
.suppressing(parentBuilder.getSuppressedTests())
.createTestSuite();
}
示例11: suite
import junit.framework.TestSuite; //导入依赖的package包/类
/**
* Required by JUnit
*/
public static TestSuite suite() {
return new OrderedTestSuite(SSTestUnittestPPTestLogHandler.class,
new String[]{
"test_process"
});
}
示例12: createTestSuite
import junit.framework.TestSuite; //导入依赖的package包/类
@Override
public TestSuite createTestSuite() {
if (!getFeatures().contains(CollectionFeature.KNOWN_ORDER)) {
List<Feature<?>> features = Helpers.copyToList(getFeatures());
features.add(CollectionFeature.KNOWN_ORDER);
withFeatures(features);
}
return super.createTestSuite();
}
示例13: suite
import junit.framework.TestSuite; //导入依赖的package包/类
/**
* Required by JUnit
*/
public static TestSuite suite() {
return new OrderedTestSuite(SSTestSecurityManager.class, new String[]{
"testFindUsersByEmail",
"testAssingBuildCreratorBug1440",
"test_isAllowedToSeeErrors",
"test_findUsersWithEditRights",
"test_getUserBuildRights",
"test_bug1008_securityManagerDoesNotCreateAUserIfItIsInUpperCase",
"test_getUserResultGroupsReturnEmptyListForAnonymousUser",
"test_isAnonymousAccessEnabled"
});
}
示例14: getTestSuiteTests
import junit.framework.TestSuite; //导入依赖的package包/类
private static void getTestSuiteTests(List<VogarTest> out, TestSuite suite) {
for (Object testsOrSuite : suite.getTestsAndSuites()) {
if (testsOrSuite instanceof Class) {
getSuiteMethods(out, (Class<?>) testsOrSuite);
} else if (testsOrSuite instanceof TestCase) {
out.add(createForTestCase((TestCase) testsOrSuite));
} else if (testsOrSuite instanceof TestSuite) {
getTestSuiteTests(out, (TestSuite) testsOrSuite);
} else if (testsOrSuite != null) {
out.add(new ConfigurationError(testsOrSuite.getClass().getName() + "#getClass",
new IllegalStateException("Unknown test: " + testsOrSuite)));
}
}
}
示例15: createSuite
import junit.framework.TestSuite; //导入依赖的package包/类
public static Test createSuite() {
TestSuite suite = new TestSuite();
suite.addTest(new InteceptorTest("createNewFile"));
suite.addTest(new InteceptorTest("createNewFolder"));
suite.addTest(new InteceptorTest("deleteA_CreateA"));
suite.addTest(new InteceptorTest("deleteA_CreateAOnDemandLocking"));
suite.addTest(new InteceptorTest("deleteA_CreateA_RunAtomic"));
suite.addTest(new InteceptorTest("afterDelete_AfterCreate_194998"));
return(suite);
}