Skip to content

Commit

Permalink
Fix brittle test (string compare of class name - String contents acci…
Browse files Browse the repository at this point in the history
…dentally renamed by IDE).
  • Loading branch information
johnmay committed May 21, 2017
1 parent 2771079 commit 2262ec1
Showing 1 changed file with 5 additions and 2 deletions.
Expand Up @@ -18,12 +18,16 @@
*/
package org.openscience.cdk.qsar;

import org.hamcrest.CoreMatchers;
import org.junit.Assert;
import org.junit.Test;
import org.openscience.cdk.CDKTestCase;
import org.openscience.cdk.exception.CDKException;
import org.openscience.cdk.qsar.result.DoubleResult;

import static org.hamcrest.CoreMatchers.instanceOf;
import static org.hamcrest.CoreMatchers.is;

/**
* @cdk.module test-standard
*/
Expand Down Expand Up @@ -99,7 +103,6 @@ public void testGetException() {
DoubleResult doubleVal = new DoubleResult(0.7);
DescriptorValue value = new DescriptorValue(spec, new String[0], new Object[0], doubleVal, new String[]{"bla"},
new CDKException("A test exception"));
Assert.assertEquals("CDKException: A test exception", value.getException()
.toString());
Assert.assertThat(value.getException(), is(instanceOf(CDKException.class)));
}
}

0 comments on commit 2262ec1

Please sign in to comment.