de.smartics.testdoc.core.doc
Class TestMethodDoc

Package class diagram package TestMethodDoc
java.lang.Object
  extended by de.smartics.testdoc.core.doc.TestMethodDoc
All Implemented Interfaces:
de.smartics.util.source.MethodInfo, Serializable

public class TestMethodDoc
     
     
extends Object
implements Serializable, de.smartics.util.source.MethodInfo

Provides information about a test method of a scenario.

See Also:
Serialized Form

Constructor Summary
TestMethodDoc(String testName, String testSentence, de.smartics.util.source.SourceCodeLocation location, String javadocComment)
          Default constructor.
 
Method Summary
 boolean equals(Object object)
          Returns true if the given object is semantically equal to the given object, false otherwise.
 String getJavadocComment()
          Returns the optional Javadoc comment of the test method.
 de.smartics.util.source.SourceCodeLocation getLocation()
          Returns the location of the test.
 String getMethodSignature()
          Returns the signature of the test method.
 String getTestName()
          Returns the name of the test.
 String getTestSentence()
          Returns the name of the test translated to a human readable sentence.
 int hashCode()
          Delegates call to String.hashCode().
 String toString()
          Delegates call to StringBuilder.toString().
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TestMethodDoc

public TestMethodDoc(String testName,
                     String testSentence,
                     de.smartics.util.source.SourceCodeLocation location,
                     String javadocComment)
              throws IllegalArgumentException
Default constructor.

Parameters:
testName - the name of the test.
testSentence - the name of the test translated to a human readable sentence.
location - the location of the test.
javadocComment - the optional Javadoc comment of the test method. May be null. If it contains only whitespaces or is empty, the value is silently set to null.
Throws:
IllegalArgumentException - if testName or testSentence is blank or location is null.
Method Detail

getTestName

public String getTestName()
Returns the name of the test. Must not be null.

Returns:
the name of the test.

getMethodSignature

public String getMethodSignature()
Returns the signature of the test method. This includes the test name and the parameter types list (with brackets).

Specified by:
getMethodSignature in interface de.smartics.util.source.MethodInfo
Returns:
the signature of the test method.
To Do:
Currently assumes that the test method has no arguments.

getTestSentence

public String getTestSentence()
Returns the name of the test translated to a human readable sentence.

Returns:
the name of the test translated to a human readable sentence.

getLocation

public de.smartics.util.source.SourceCodeLocation getLocation()
Returns the location of the test. This is the location of the test method.

Specified by:
getLocation in interface de.smartics.util.source.MethodInfo
Returns:
the location of the test.

getJavadocComment

public String getJavadocComment()
Returns the optional Javadoc comment of the test method. May be null.

Returns:
the optional Javadoc comment of the test method.

hashCode

public int hashCode()
Delegates call to String.hashCode().

Overrides:
hashCode in class Object
Returns:
the result of the call to String.hashCode().
See Also:
String.hashCode()

equals

public boolean equals(Object object)
Returns true if the given object is semantically equal to the given object, false otherwise.

Overrides:
equals in class Object
Parameters:
object - the instance to compare to.
Returns:
true if the given object is semantically equal to the given object, false otherwise.

toString

public String toString()
Delegates call to StringBuilder.toString().

Overrides:
toString in class Object
Returns:
the result of the call to StringBuilder.toString().
See Also:
StringBuilder.toString()


Copyright © 2010-2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.