hudson.plugins.javatest_report
Class TestCollection<S extends TestCollection<S,C>,C extends TestObject<C>>

java.lang.Object
  extended by hudson.plugins.javatest_report.TestObject<S>
      extended by hudson.plugins.javatest_report.TestCollection<S,C>
Type Parameters:
C - Type of the child objects in this collection.
S - The derived type of TestCollection (the same design pattern as you seen in Enum)
All Implemented Interfaces:
hudson.model.ModelObject
Direct Known Subclasses:
Package, Report, Suite, Test

public abstract class TestCollection<S extends TestCollection<S,C>,C extends TestObject<C>>
extends TestObject<S>

TestObject that is a collection of other TestObjects.

Author:
Kohsuke Kawaguchi, Rama Pulavarthi, Vladimir Ralev

Constructor Summary
TestCollection()
           
 
Method Summary
 void add(C t)
          Adds a new child TestObject to this.
 C get(java.lang.String id)
          Gets a Test by its id.
 java.util.Collection<C> getChildren()
           
abstract  java.lang.String getChildTitle()
          Returns the caption of the children.
 C getDynamic(java.lang.String name, org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
           
 int getFailCount()
           
 java.util.Collection<C> getFailedTests()
           
 java.lang.String[] getPackages()
           
 Package getPackageTests(java.lang.String packageName)
           
 int getSkippedCount()
           
 java.util.Collection<C> getSkippedTests()
           
 int getTotalCount()
           
 
Methods inherited from class hudson.plugins.javatest_report.TestObject
addAttribute, getAge, getDescription, getDisplayName, getFailedSince, getId, getName, getOwner, getPreviousResult, getStatus, getStatusMessage, setDescription, setId, setName, setStatusString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestCollection

public TestCollection()
Method Detail

getChildren

public java.util.Collection<C> getChildren()

getFailedTests

public java.util.Collection<C> getFailedTests()

getSkippedTests

public java.util.Collection<C> getSkippedTests()

getTotalCount

public int getTotalCount()
Specified by:
getTotalCount in class TestObject<S extends TestCollection<S,C>>

getFailCount

public int getFailCount()
Specified by:
getFailCount in class TestObject<S extends TestCollection<S,C>>

getSkippedCount

public int getSkippedCount()
Specified by:
getSkippedCount in class TestObject<S extends TestCollection<S,C>>

getChildTitle

public abstract java.lang.String getChildTitle()
Returns the caption of the children. Used in the view.


get

public C get(java.lang.String id)
Gets a Test by its id.


add

public void add(C t)
Adds a new child TestObject to this.

For Digester.


getPackages

public java.lang.String[] getPackages()

getPackageTests

public Package getPackageTests(java.lang.String packageName)

getDynamic

public C getDynamic(java.lang.String name,
                    org.kohsuke.stapler.StaplerRequest req,
                    org.kohsuke.stapler.StaplerResponse rsp)


Copyright © 2004-2011. All Rights Reserved.