[jbosstools-issues] [JBoss JIRA] (JBIDE-24375) Tests: Remove PowerMock usage
Andre Dietisheim (JIRA)
issues at jboss.org
Mon May 15 04:35:02 EDT 2017
[ https://issues.jboss.org/browse/JBIDE-24375?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andre Dietisheim closed JBIDE-24375.
------------------------------------
> Tests: Remove PowerMock usage
> -----------------------------
>
> Key: JBIDE-24375
> URL: https://issues.jboss.org/browse/JBIDE-24375
> Project: Tools (JBoss Tools)
> Issue Type: Task
> Components: openshift
> Affects Versions: 4.4.4.AM3
> Reporter: Aurélien Pupier
> Assignee: Andre Dietisheim
> Labels: openshift_v3, tests
> Fix For: 4.4.4.Final
>
>
> I create this issue to gather ideas to get rid of it.
> see https://github.com/jbosstools/jbosstools-openshift/blob/cf544dbec4baa87c63768c43680f0d2d0de2af61/tests/org.jboss.tools.openshift.test/src/org/jboss/tools/openshift/test/core/server/OpenShiftServerUtilsPowerMockTest.java
> from why i understand, PowerMock is used only to mock a singleton access in a static method.
> The reasonable seems to avoid static method: OpenShiftServerUtils. If we are using an instanciation for this class, then, the call to create the Watcher can be extracted in a method and this method would be classically mockable with Mockito.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
More information about the jbosstools-issues
mailing list