コード例 #1
0
 private void addClassLevelVersionsTo(List<String> versions) {
   String classVersion =
       TestAnnotations.forClass(testOutcome.getTestCase())
           .getAnnotatedVersionForTestCase(testOutcome.getTestCase());
   if (classVersion != null) {
     versions.add(classVersion);
   }
 }
コード例 #2
0
 private void addMethodLevelIssuesTo(List<String> issues) {
   Optional<String> issue =
       TestAnnotations.forClass(testOutcome.getTestCase())
           .getAnnotatedIssueForMethod(testOutcome.getName());
   if (issue.isPresent()) {
     issues.add(issue.get());
   }
   String[] multipleIssues =
       TestAnnotations.forClass(testOutcome.getTestCase())
           .getAnnotatedIssuesForMethod(testOutcome.getName());
   issues.addAll(Arrays.asList(multipleIssues));
 }
コード例 #3
0
 private void addClassLevelIssuesTo(List<String> issues) {
   String classIssue =
       TestAnnotations.forClass(testOutcome.getTestCase())
           .getAnnotatedIssueForTestCase(testOutcome.getTestCase());
   if (classIssue != null) {
     issues.add(classIssue);
   }
   String[] classIssues =
       TestAnnotations.forClass(testOutcome.getTestCase())
           .getAnnotatedIssuesForTestCase(testOutcome.getTestCase());
   if (classIssues != null) {
     issues.addAll(Arrays.asList(classIssues));
   }
 }
コード例 #4
0
  private TestOutcome createScenarioOutcome(TestOutcome parameterizedOutcome) {
    TestOutcome testOutcome =
        TestOutcome.forTest(
            normalizeMethodName(parameterizedOutcome), parameterizedOutcome.getTestCase());

    return testOutcome;
  }
コード例 #5
0
 private void addMethodLevelVersionsTo(List<String> versions) {
   Optional<String> version =
       TestAnnotations.forClass(testOutcome.getTestCase())
           .getAnnotatedVersionForMethod(testOutcome.getName());
   if (version.isPresent()) {
     versions.add(version.get());
   }
 }
コード例 #6
0
 public List<String> readVersions() {
   List<String> taggedVersions = Lists.newArrayList();
   if (testOutcome.getTestCase() != null) {
     addMethodLevelVersionsTo(taggedVersions);
     addClassLevelVersionsTo(taggedVersions);
   }
   return taggedVersions;
 }
コード例 #7
0
 public List<String> readIssues() {
   List<String> taggedIssues = Lists.newArrayList();
   if (testOutcome.getTestCase() != null) {
     addMethodLevelIssuesTo(taggedIssues);
     addClassLevelIssuesTo(taggedIssues);
   }
   addTitleLevelIssuesTo(taggedIssues);
   return taggedIssues;
 }