Allon Mureinik has uploaded a new change for review. Change subject: core: MockConfigRule JUnit 4.10 upgrade ......................................................................
core: MockConfigRule JUnit 4.10 upgrade Extended TestWatcher instead of the deprecated TestWatchman. Change-Id: I4c07f50b4b1d52e4a7eeea556efa6fa8a37ab39d Signed-off-by: Allon Mureinik <amure...@redhat.com> --- M backend/manager/modules/utils/src/test/java/org/ovirt/engine/core/utils/MockConfigRule.java 1 file changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/11/9711/1 diff --git a/backend/manager/modules/utils/src/test/java/org/ovirt/engine/core/utils/MockConfigRule.java b/backend/manager/modules/utils/src/test/java/org/ovirt/engine/core/utils/MockConfigRule.java index 0402a30..b36def2 100644 --- a/backend/manager/modules/utils/src/test/java/org/ovirt/engine/core/utils/MockConfigRule.java +++ b/backend/manager/modules/utils/src/test/java/org/ovirt/engine/core/utils/MockConfigRule.java @@ -8,8 +8,8 @@ import java.util.Collections; import java.util.List; -import org.junit.rules.TestWatchman; -import org.junit.runners.model.FrameworkMethod; +import org.junit.rules.TestWatcher; +import org.junit.runner.Description; import org.ovirt.engine.core.common.config.Config; import org.ovirt.engine.core.common.config.ConfigValues; import org.ovirt.engine.core.common.config.IConfigUtilsInterface; @@ -20,7 +20,7 @@ * To use it, simple add a {@link MockConfigRule} member to your test, with the {@link @Rule} annotation. * Mocking is done by calling {@link #mockConfigValue(ConfigValues, Object)} or {@link #mockConfigValue(ConfigValues, String, Object)} with the value you need. */ -public class MockConfigRule extends TestWatchman { +public class MockConfigRule extends TestWatcher { /** A descriptor for a single config mocking */ public static class MockConfigDescriptor<T> { @@ -85,7 +85,7 @@ } @Override - public void starting(FrameworkMethod method) { + public void starting(Description description) { origConfUtils = Config.getConfigUtils(); Config.setConfigUtils(mock(IConfigUtilsInterface.class)); @@ -95,7 +95,7 @@ } @Override - public void finished(FrameworkMethod method) { + public void finished(Description description) { Config.setConfigUtils(origConfUtils); } } -- To view, visit http://gerrit.ovirt.org/9711 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4c07f50b4b1d52e4a7eeea556efa6fa8a37ab39d Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Allon Mureinik <amure...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches