Skip to content

Commit

Permalink
Added missing test annotation
Browse files Browse the repository at this point in the history
Signed-off-by: Rajarshi  Guha <rajarshi.guha@gmail.com>
  • Loading branch information
egonw authored and rajarshi committed Jun 27, 2011
1 parent 6ae652f commit 4601c4b
Showing 1 changed file with 9 additions and 1 deletion.
Expand Up @@ -37,6 +37,7 @@

import org.openscience.cdk.Monomer;
import org.openscience.cdk.Strand;
import org.openscience.cdk.annotations.TestClass;
import org.openscience.cdk.annotations.TestMethod;
import org.openscience.cdk.exception.CDKException;
import org.openscience.cdk.interfaces.IAtomContainer;
Expand Down Expand Up @@ -119,6 +120,7 @@
* @cdk.dictref qsar-descriptors:taeAminoAcid
* @see IBioPolymer
*/
@TestClass("org.openscience.cdk.qsar.descriptors.protein.TaeAminoAcidDescriptorTest")
public class TaeAminoAcidDescriptor implements IMolecularDescriptor {
private static ILoggingTool logger =
LoggingToolFactory.createLoggingTool(TaeAminoAcidDescriptor.class);
Expand Down Expand Up @@ -207,6 +209,7 @@ public TaeAminoAcidDescriptor() {
loadTAEParams();
}

@TestMethod("testGetSpecification")
public DescriptorSpecification getSpecification() {
return new DescriptorSpecification(
"http://www.blueobelisk.org/ontologies/chemoinformatics-algorithms/#taeAminoAcid",
Expand All @@ -223,6 +226,7 @@ public DescriptorSpecification getSpecification() {
* @throws org.openscience.cdk.exception.CDKException
* Description of the Exception
*/
@TestMethod("testSetParameters_arrayObject")
public void setParameters(Object[] params) throws CDKException {
// no parameters for this descriptor
}
Expand All @@ -232,6 +236,7 @@ public void setParameters(Object[] params) throws CDKException {
*
* @return The parameters value
*/
@TestMethod("testGetParameters")
public Object[] getParameters() {
// no parameters to return
return (null);
Expand All @@ -249,6 +254,7 @@ public String[] getDescriptorNames() {
*
* @return The parameterNames value
*/
@TestMethod("testGetParameterNames")
public String[] getParameterNames() {
// no param names to return
return (null);
Expand All @@ -261,6 +267,7 @@ public String[] getParameterNames() {
* @param name Description of the Parameter
* @return The parameterType value
*/
@TestMethod("testGetParameterType_String")
public Object getParameterType(String name) {
return (null);
}
Expand All @@ -279,7 +286,7 @@ private DescriptorValue getDummyDescriptorValue(Exception e) {
* @param container Parameter is the atom container which should implement {@link IBioPolymer}.
* @return A DoubleArrayResult value representing the 147 TAE descriptors
*/

@TestMethod("testTaeAminoAcidDescriptor")
public DescriptorValue calculate(IAtomContainer container) {
if (TAEParams == null) return getDummyDescriptorValue(new CDKException("TAE parameters were not initialized"));
if (!(container instanceof IBioPolymer)) return getDummyDescriptorValue(new CDKException("The molecule should be of type IBioPolymer"));
Expand Down Expand Up @@ -331,6 +338,7 @@ public DescriptorValue calculate(IAtomContainer container) {
* @return an object that implements the {@link org.openscience.cdk.qsar.result.IDescriptorResult} interface indicating
* the actual type of values returned by the descriptor in the {@link org.openscience.cdk.qsar.DescriptorValue} object
*/
@TestMethod("testGetDescriptorResultType")
public IDescriptorResult getDescriptorResultType() {
return new DoubleArrayResult();
}
Expand Down

0 comments on commit 4601c4b

Please sign in to comment.