import org.custommonkey.xmlunit.NodeTester;
import org.custommonkey.xmlunit.XMLAssert;
import org.custommonkey.xmlunit.XMLUnit;
+import org.hamcrest.CoreMatchers;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
-import org.junit.matchers.JUnitMatchers;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.opendaylight.controller.config.api.ConflictingVersionException;
}
private void assertContainsString(String string, String substring) {
- assertThat(string, JUnitMatchers.containsString(substring));
+ assertThat(string, CoreMatchers.containsString(substring));
}
private void checkEnum(final Document response) throws Exception {
import org.junit.Assert;
import org.junit.Test;
-import org.junit.matchers.JUnitMatchers;
+import org.hamcrest.CoreMatchers;
import org.opendaylight.controller.config.api.LookupRegistry;
import org.opendaylight.controller.config.yangjmxgenerator.ModuleMXBeanEntry;
import org.opendaylight.yangtools.yang.common.QName;
String message = e.getMessage();
Assert.assertThat(
message,
- JUnitMatchers
+ CoreMatchers
.containsString("missing from config subsystem but present in yangstore: [(namespace?revision=1970-01-01)qname2]"));
Assert.assertThat(
message,
- JUnitMatchers
+ CoreMatchers
.containsString("All modules present in config: [(namespace?revision=1970-01-01)qname1]"));
}
}
import java.util.List;
import java.util.Properties;
+import static org.hamcrest.CoreMatchers.containsString;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.fail;
-import static org.junit.matchers.JUnitMatchers.containsString;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;
import static org.opendaylight.controller.netconf.persist.impl.PersisterAggregator.PersisterWithConfiguration;
*/
package org.opendaylight.controller.netconf.persist.impl.osgi;
+import static org.hamcrest.CoreMatchers.containsString;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.fail;
-import org.junit.matchers.JUnitMatchers;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
private void assertException(Throwable t, Class<? extends Exception> exType, String exMessageToContain) {
assertEquals("Expected exception of type " + exType + " but was " + t, exType, t.getClass());
if(exMessageToContain!=null) {
- assertThat(t.getMessage(), JUnitMatchers.containsString(exMessageToContain));
+ assertThat(t.getMessage(), containsString(exMessageToContain));
}
}