Migrace is() to isA() 99/14099/2
authorRobert Varga <rovarga@cisco.com>
Mon, 12 Jan 2015 11:55:32 +0000 (12:55 +0100)
committerRobert Varga <rovarga@cisco.com>
Thu, 15 Jan 2015 10:09:46 +0000 (11:09 +0100)
The former is deprecated, so move to using the non-deprecated method.

Change-Id: I5b83e41e2c591fd3a742c64733e0205a60b08de5
Signed-off-by: Robert Varga <rovarga@cisco.com>
opendaylight/config/yang-jmx-generator/src/test/java/org/opendaylight/controller/config/yangjmxgenerator/ModuleMXBeanEntryTest.java

index 17d4d9a5245297a3a54eb55bb19e7c414675e77b..e116f480c52a9aad07a23231fff2bca8e1a2f002 100644 (file)
@@ -8,6 +8,7 @@
 package org.opendaylight.controller.config.yangjmxgenerator;
 
 import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.isA;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
@@ -16,7 +17,6 @@ import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.mock;
-
 import com.google.common.collect.Sets;
 import java.net.URI;
 import java.net.URISyntaxException;
@@ -113,7 +113,7 @@ public class ModuleMXBeanEntryTest extends AbstractYangTest {
                 is("threadFactory"));
         assertThat(threadFactoryAttribute.getUpperCaseCammelCase(),
                 is("ThreadFactory"));
-        assertThat(threadFactoryAttribute.getOpenType(), is(SimpleType.class));
+        assertThat(threadFactoryAttribute.getOpenType(), isA(SimpleType.class));
         assertNull(threadFactoryAttribute.getNullableDefault());
         assertNull(threadFactoryAttribute.getNullableDescription());
         assertThat(threadFactoryAttribute.getType().getName(), is("ObjectName"));
@@ -261,7 +261,7 @@ public class ModuleMXBeanEntryTest extends AbstractYangTest {
                 assertThat(toAttr.getAttributeYangName(), is("peer"));
                 assertThat(toAttr.getLowerCaseCammelCase(), is("peer"));
                 assertThat(toAttr.getUpperCaseCammelCase(), is("Peer"));
-                assertThat(toAttr.getOpenType(), is(CompositeType.class));
+                assertThat(toAttr.getOpenType(), isA(CompositeType.class));
                 Set<String> propsExpected = new HashSet<String>(2);
                 propsExpected.add("port");
                 propsExpected.add("core-size");
@@ -296,7 +296,7 @@ public class ModuleMXBeanEntryTest extends AbstractYangTest {
                         is("innerStreamList"));
                 assertThat(innerStream.getUpperCaseCammelCase(),
                         is("InnerStreamList"));
-                assertThat(innerStream.getOpenType(), is(ArrayType.class));
+                assertThat(innerStream.getOpenType(), isA(ArrayType.class));
 
             }