當前位置: 首頁>>代碼示例>>Java>>正文


Java Filter.ALL屬性代碼示例

本文整理匯總了Java中org.junit.runner.manipulation.Filter.ALL屬性的典型用法代碼示例。如果您正苦於以下問題:Java Filter.ALL屬性的具體用法?Java Filter.ALL怎麽用?Java Filter.ALL使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在org.junit.runner.manipulation.Filter的用法示例。


在下文中一共展示了Filter.ALL屬性的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getDescription

/**
 * The defines the tree of tests that will be run.
 */
@Override
public Description getDescription() {

    ensureInit();
    if (filter != Filter.ALL || sorter != null) {
        suiteDescription = rebuildDescriptionByFilter(suiteDescription);
    }

    return suiteDescription;
}
 
開發者ID:richard-melvin,項目名稱:junit-theory-suite,代碼行數:13,代碼來源:TheorySuite.java

示例2: ensureInit

/**
 * Initialise all data members. Needed as a lot of work gets done before
 * constructor completes.
 */
private void ensureInit() {
    if (suiteDescription == null) {

        suiteDescription = Description.createSuiteDescription(getTestClass().getJavaClass());
        descriptions = new IdentityHashMap<>();
        checksByMethod = new ConcurrentHashMap<>();
        finder = new PotentialAssignmentFinder(getTestClass());
        constraints = new ConstraintFinder(getTestClass(), this::reportError);
        filter = Filter.ALL;
    }
}
 
開發者ID:richard-melvin,項目名稱:junit-theory-suite,代碼行數:15,代碼來源:TheorySuite.java

示例3: addTestSuite

private void addTestSuite(TestSuiteNode parentSuite, Description suiteDescription) {
  TestSuiteNode suite = new TestSuiteNode(suiteDescription);
  for (Description childDesc : suiteDescription.getChildren()) {
    if (childDesc.isTest()) {
      addTestCase(suite, childDesc);
    } else {
      addTestSuite(suite, childDesc);
    }
  }
  // Empty suites are pruned when sharding.
  if (shardingFilter == Filter.ALL || !suite.getChildren().isEmpty()) {
    parentSuite.addTestSuite(suite);
    testsMap.put(suiteDescription, suite);
  }
}
 
開發者ID:bazelbuild,項目名稱:bazel,代碼行數:15,代碼來源:TestSuiteModel.java

示例4: testFilterShould

@Test
public void testFilterShould() throws Exception {
    // Given:
    Filter filter = Filter.ALL;

    // When:
    underTest.filter(filter);

    // Then:
    assertThat(underTest.getDescription().getChildren().size()).isGreaterThan(0);
}
 
開發者ID:TNG,項目名稱:junit-dataprovider,代碼行數:11,代碼來源:DataProviderRunnerTest.java

示例5: and

/**
 * Returns a filter that evaluates to {@code true} if both of its
 * components evaluates to {@code true}. The filters are evaluated in
 * order, and evaluation will be "short-circuited" if the first filter
 * returns {@code false}.
 */
public static Filter and(Filter delegate1, Filter delegate2) {
  return delegate1 == Filter.ALL ? delegate2
      : (delegate2 == Filter.ALL ? delegate1
          : new AndFilter(delegate1, delegate2));
}
 
開發者ID:bazelbuild,項目名稱:bazel,代碼行數:11,代碼來源:Filters.java


注:本文中的org.junit.runner.manipulation.Filter.ALL屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。