mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-14 20:42:21 +00:00
fixed SpotBugs JUA_DONT_ASSERT_INSTANCEOF_IN_TESTS
This commit is contained in:
1 parent
1e0488f19c
commit
71e689c698
1 file changed
+3
-1
@@ -25,11 +25,13 @@ package jenkins.util.xstream;
|
||||
|
||||
import hudson.util.XStream2;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.hamcrest.core.IsInstanceOf;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.xmlunit.diff.DefaultNodeMatcher;
|
||||
import org.xmlunit.diff.ElementSelectors;
|
||||
|
||||
import static org.hamcrest.Matchers.instanceOf;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNull;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
@@ -141,7 +143,7 @@ public class XStreamDOMTest {
|
||||
v.values.put("foo",createSomeFoo().bar);
|
||||
String xml = xs.toXML(v);
|
||||
Object v2 = xs.fromXML(xml);
|
||||
assertTrue(v2 instanceof DomInMap);
|
||||
assertThat(v2, instanceOf(DomInMap.class));
|
||||
assertXStreamDOMEquals(v.values.get("foo"), ((DomInMap)v2).values.get("foo"));
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user