Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-24375

Tests: Remove PowerMock usage

    XMLWordPrintable

Details

    Description

      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.

      Attachments

        Activity

          People

            adietish@redhat.com André Dietisheim
            apupier@redhat.com Aurélien Pupier
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: