Skip to content

Commit

Permalink
Fifth batch of removal of TestClass/-Method use
Browse files Browse the repository at this point in the history
Change-Id: Id4e8ecf935cc519f529766dc1b3efe1b16b0078d

Signed-off-by: John May <john.wilkinsonmay@gmail.com>
  • Loading branch information
egonw authored and johnmay committed Jan 16, 2015
1 parent 1f3633c commit fb51e91
Show file tree
Hide file tree
Showing 37 changed files with 0 additions and 317 deletions.
13 changes: 0 additions & 13 deletions misc/extra/src/main/java/org/openscience/cdk/Association.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
*/
package org.openscience.cdk;

import org.openscience.cdk.annotations.TestClass;
import org.openscience.cdk.annotations.TestMethod;
import org.openscience.cdk.interfaces.IAtom;

/**
Expand All @@ -33,7 +31,6 @@
* @cdk.keyword association
* @cdk.keyword bond
*/
@TestClass("org.openscience.cdk.AssociationTest")
public class Association extends ElectronContainer implements java.io.Serializable, Cloneable {

/**
Expand All @@ -60,7 +57,6 @@ public class Association extends ElectronContainer implements java.io.Serializab
* @param atom2 An atom to be associated with another atom
* @see org.openscience.cdk.Atom
*/
@TestMethod("testAssociation_IAtom_IAtom")
public Association(IAtom atom1, IAtom atom2) {
atoms = new IAtom[2];
atoms[0] = atom1;
Expand All @@ -73,7 +69,6 @@ public Association(IAtom atom1, IAtom atom2) {
*
* @see org.openscience.cdk.Atom
*/
@TestMethod("testAssociation")
public Association() {
atoms = new Atom[2];
atomCount = 0;
Expand All @@ -86,7 +81,6 @@ public Association() {
*
* @see #setAtoms
*/
@TestMethod("testGetAtoms")
public IAtom[] getAtoms() {
IAtom[] returnAtoms = new Atom[atomCount];
System.arraycopy(this.atoms, 0, returnAtoms, 0, returnAtoms.length);
Expand All @@ -100,7 +94,6 @@ public IAtom[] getAtoms() {
*
* @see #getAtoms
*/
@TestMethod("testSetAtoms")
public void setAtoms(IAtom[] atoms) {
this.atoms = atoms;
notifyChanged();
Expand All @@ -111,7 +104,6 @@ public void setAtoms(IAtom[] atoms) {
*
* @return The number of Atoms in this Association
*/
@TestMethod("testGetAtomCount")
public int getAtomCount() {
return atomCount;
}
Expand All @@ -121,7 +113,6 @@ public int getAtomCount() {
*
* @return The number of electrons in a Association.
*/
@TestMethod("testGetAtomAt")
@Override
public Integer getElectronCount() {
return 0;
Expand All @@ -135,7 +126,6 @@ public Integer getElectronCount() {
*
* @see #setAtomAt
*/
@TestMethod("testGetAtomAt")
public IAtom getAtomAt(int position) {
return atoms[position];
}
Expand All @@ -146,7 +136,6 @@ public IAtom getAtomAt(int position) {
* @param atom The atom to be tested if it participates in this Association
* @return true if the atom participates in this Association
*/
@TestMethod("testContains")
public boolean contains(IAtom atom) {
for (IAtom atom1 : atoms) {
if (atom1 == atom) {
Expand All @@ -164,7 +153,6 @@ public boolean contains(IAtom atom) {
*
* @see #getAtomAt
*/
@TestMethod("testSetAtomAt")
public void setAtomAt(IAtom atom, int position) {
atoms[position] = atom;
notifyChanged();
Expand All @@ -176,7 +164,6 @@ public void setAtomAt(IAtom atom, int position) {
*
* @return The string representation of this Container
*/
@TestMethod("testToString")
@Override
public String toString() {
StringBuilder s = new StringBuilder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
import java.util.HashMap;
import java.util.List;

import org.openscience.cdk.annotations.TestClass;
import org.openscience.cdk.annotations.TestMethod;
import org.openscience.cdk.config.isotopes.IsotopeReader;
import org.openscience.cdk.interfaces.IChemObjectBuilder;
import org.openscience.cdk.interfaces.IIsotope;
Expand Down Expand Up @@ -56,7 +54,6 @@
* @cdk.keyword isotope
* @cdk.keyword element
*/
@TestClass("org.openscience.cdk.config.XMLIsotopeFactoryTest")
public class XMLIsotopeFactory extends IsotopeFactory {

private static XMLIsotopeFactory ifac = null;
Expand Down Expand Up @@ -110,7 +107,6 @@ private XMLIsotopeFactory(IChemObjectBuilder builder) throws IOException {
* @return The instance value
* @exception IOException if isotopic data files could not be read.
*/
@TestMethod("testGetInstance_IChemObjectBuilder")
public static XMLIsotopeFactory getInstance(IChemObjectBuilder builder) throws IOException {
if (ifac == null) {
ifac = new XMLIsotopeFactory(builder);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
import java.util.ArrayList;
import java.util.List;

import org.openscience.cdk.annotations.TestClass;
import org.openscience.cdk.annotations.TestMethod;
import org.openscience.cdk.interfaces.IIsotope;
import org.openscience.cdk.interfaces.IChemObjectBuilder;
import org.openscience.cdk.tools.ILoggingTool;
Expand Down Expand Up @@ -50,7 +48,6 @@
* @cdk.module extra
* @cdk.githash
*/
@TestClass("org.openscience.cdk.config.isotopes.IsotopeHandlerTest")
public class IsotopeHandler extends DefaultHandler {

private static ILoggingTool logger = LoggingToolFactory.createLoggingTool(IsotopeHandler.class);
Expand All @@ -68,7 +65,6 @@ public class IsotopeHandler extends DefaultHandler {
*
* @param builder The IChemObjectBuilder used to create new IIsotope's.
*/
@TestMethod("testIsotopeHandler_IChemObjectBuilder")
public IsotopeHandler(IChemObjectBuilder builder) {
this.builder = builder;
}
Expand All @@ -78,7 +74,6 @@ public IsotopeHandler(IChemObjectBuilder builder) {
*
* @return A List object with all isotopes
*/
@TestMethod("testGetIsotopes")
public List<IIsotope> getIsotopes() {
return isotopes;
}
Expand All @@ -87,14 +82,12 @@ public List<IIsotope> getIsotopes() {

/** {@inheritDoc} */
@Override
@TestMethod("testStartDocument")
public void startDocument() {
isotopes = new ArrayList<IIsotope>();
}

/** {@inheritDoc} */
@Override
@TestMethod("testEndElement_String_String_String")
public void endElement(String uri, String local, String raw) {
logger.debug("end element: ", raw);
if ("isotope".equals(local)) {
Expand All @@ -120,7 +113,6 @@ public void endElement(String uri, String local, String raw) {

/** {@inheritDoc} */
@Override
@TestMethod("testEndElement_String_String_String")
public void startElement(String uri, String local, String raw, Attributes atts) {
currentChars = "";
dictRef = "";
Expand All @@ -143,7 +135,6 @@ public void startElement(String uri, String local, String raw, Attributes atts)

/** {@inheritDoc} */
@Override
@TestMethod("testCharacters_arraychar_int_int")
public void characters(char chars[], int start, int length) {
currentChars += new String(chars, start, length);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@

import javax.xml.parsers.ParserConfigurationException;

import org.openscience.cdk.annotations.TestClass;
import org.openscience.cdk.annotations.TestMethod;
import org.openscience.cdk.interfaces.IIsotope;
import org.openscience.cdk.interfaces.IChemObjectBuilder;
import org.openscience.cdk.tools.ILoggingTool;
Expand All @@ -52,7 +50,6 @@
*
* @author Egon Willighagen
*/
@TestClass("org.openscience.cdk.config.isotopes.IsotopeReaderTest")
public class IsotopeReader {

private XMLReader parser;
Expand All @@ -67,7 +64,6 @@ public class IsotopeReader {
* @param input InputStream with the XML source
* @param builder The {@link IChemObjectBuilder} used to create new IIsotope's.
*/
@TestMethod("testIsotopeReader_InputStream_IChemObjectBuilder")
public IsotopeReader(InputStream input, IChemObjectBuilder builder) {
this.init();
this.input = input;
Expand Down Expand Up @@ -126,7 +122,6 @@ private void init() {
* @return a List of Isotope's. Returns an empty list is some reading error
* occurred.
*/
@TestMethod("testReadIsotopes,testReadIsotopes2")
public List<IIsotope> readIsotopes() {
List<IIsotope> isotopes = new ArrayList<IIsotope>();
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@

import javax.vecmath.Point3d;

import org.openscience.cdk.annotations.TestClass;
import org.openscience.cdk.annotations.TestMethod;
import org.openscience.cdk.config.Isotopes;
import org.openscience.cdk.config.IsotopeFactory;
import org.openscience.cdk.exception.CDKException;
Expand Down Expand Up @@ -92,7 +90,6 @@
* @cdk.dictref blue-obelisk:alignmentKabsch
* @cdk.githash
*/
@TestClass("org.openscience.cdk.geometry.alignment.KabschAlignmentTest")
public class KabschAlignment {

private ILoggingTool logger = LoggingToolFactory.createLoggingTool(KabschAlignment.class);
Expand Down Expand Up @@ -234,7 +231,6 @@ public KabschAlignment(IAtom[] al1, IAtom[] al2, double[] wts) throws CDKExcepti
* so that the RMDS is minimized to the coordinates of the first one
* @throws CDKException if the number of atom's are not the same in the two AtomContainer's
*/
@TestMethod("testAlign")
public KabschAlignment(IAtomContainer ac1, IAtomContainer ac2) throws CDKException {
if (ac1.getAtomCount() != ac2.getAtomCount()) {
throw new CDKException("The AtomContainer's being aligned must have the same number of atoms");
Expand Down Expand Up @@ -283,7 +279,6 @@ public KabschAlignment(IAtomContainer ac1, IAtomContainer ac2, double[] wts) thr
* This method aligns to set of atoms which should have been specified
* prior to this call
*/
@TestMethod("testAlign")
public void align() {

Matrix tmp;
Expand Down Expand Up @@ -427,7 +422,6 @@ public void align() {
* @return The RMSD for this alignment
* @see #align
*/
@TestMethod("testAlign")
public double getRMSD() {
return (this.rmsd);
}
Expand All @@ -438,7 +432,6 @@ public double getRMSD() {
* @return A double[][] representing the rotation matrix
* @see #align
*/
@TestMethod("testAlign")
public double[][] getRotationMatrix() {
return (this.U);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@

package org.openscience.cdk.index;

import org.openscience.cdk.annotations.TestClass;
import org.openscience.cdk.annotations.TestMethod;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

Expand All @@ -49,7 +46,6 @@
* @cdk.keyword CAS number
* @cdk.require java1.4+
*/
@TestClass("org.openscience.cdk.index.CASNumberTest")
public class CASNumber {

/**
Expand All @@ -60,7 +56,6 @@ public class CASNumber {
* @cdk.keyword validation
* @return true if a valid CAS number, false otherwise
*/
@TestMethod("testInvalidCheckDigits,testValidNumbers")
public static boolean isValid(String casNumber) {
boolean overall = true;
/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
import javax.vecmath.Point3d;
import javax.vecmath.Vector3d;

import org.openscience.cdk.annotations.TestClass;
import org.openscience.cdk.annotations.TestMethod;
import org.openscience.cdk.exception.CDKException;
import org.openscience.cdk.geometry.CrystalGeometryTools;
import org.openscience.cdk.interfaces.IAtom;
Expand All @@ -48,7 +46,6 @@
* @cdk.githash
* @cdk.iooptions
*/
@TestClass("org.openscience.cdk.io.CrystClustReaderTest")
public class CrystClustReader extends DefaultChemObjectReader {

private BufferedReader input;
Expand All @@ -69,13 +66,11 @@ public CrystClustReader(InputStream input) {
this(new InputStreamReader(input));
}

@TestMethod("testGetFormat")
@Override
public IResourceFormat getFormat() {
return CrystClustFormat.getInstance();
}

@TestMethod("testSetReader_Reader")
@Override
public void setReader(Reader reader) throws CDKException {
if (reader instanceof BufferedReader) {
Expand All @@ -85,13 +80,11 @@ public void setReader(Reader reader) throws CDKException {
}
}

@TestMethod("testSetReader_InputStream")
@Override
public void setReader(InputStream input) throws CDKException {
setReader(new InputStreamReader(input));
}

@TestMethod("testAccepts")
@Override
public boolean accepts(Class<? extends IChemObject> classObject) {
if (IChemFile.class.equals(classObject)) return true;
Expand Down Expand Up @@ -239,7 +232,6 @@ private IChemFile readChemFile(IChemFile file) throws CDKException {
return file;
}

@TestMethod("testClose")
@Override
public void close() throws IOException {
input.close();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@

import javax.vecmath.Vector3d;

import org.openscience.cdk.annotations.TestClass;
import org.openscience.cdk.annotations.TestMethod;
import org.openscience.cdk.exception.CDKException;
import org.openscience.cdk.exception.UnsupportedChemObjectException;
import org.openscience.cdk.interfaces.IAtom;
Expand All @@ -50,7 +48,6 @@
* @cdk.githash
* @cdk.iooptions
*/
@TestClass("org.openscience.cdk.io.CrystClustWriterTest")
public class CrystClustWriter extends DefaultChemObjectWriter {

private BufferedWriter writer;
Expand Down Expand Up @@ -82,7 +79,6 @@ public CrystClustWriter() {
this(new StringWriter());
}

@TestMethod("testGetFormat")
@Override
public IResourceFormat getFormat() {
return CrystClustFormat.getInstance();
Expand All @@ -102,7 +98,6 @@ public void setWriter(OutputStream output) throws CDKException {
setWriter(new OutputStreamWriter(output));
}

@TestMethod("testAccepts")
@Override
public boolean accepts(Class<? extends IChemObject> classObject) {
Class<?>[] interfaces = classObject.getInterfaces();
Expand Down Expand Up @@ -132,7 +127,6 @@ public void write(IChemObject object) throws UnsupportedChemObjectException {
/**
* Flushes the output and closes this object.
*/
@TestMethod("testClose")
@Override
public void close() throws IOException {
writer.close();
Expand Down

0 comments on commit fb51e91

Please sign in to comment.