[forge-issues] [JBoss JIRA] (FORGE-2144) Adding powermock rule into the test will cause forge to be unable to find it

Matej Briskar (JIRA) issues at jboss.org
Thu Nov 13 09:59:29 EST 2014


     [ https://issues.jboss.org/browse/FORGE-2144?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matej Briskar updated FORGE-2144:
---------------------------------
    Description: 
Powermock is a framework for mocking static methods (this is a tricky thing to do). By default you will run it using @RunWith annotation, however since the arquillian has it's own @RunWith(Arquillian.class) annotation, it provides an option to use the mocking using the junit.Rule. This, however, makes the tests fail.
The difference is in the  registry.getExportedInstance() for the _DEFAULT_ addon. In one it returns the class, in the other it does not.

Recently, there was added another way of running the powermock along arquillian using java agent, so users of this framework will still have hope within forge testing. Haven't tried it yet.

  was:
Powermock is a framework for mocking static methods (this is a tricky thing to do). By default you will run it using @RunWith annotation, however since the arquillian has it's own @RunWith(Arquillian.class) annotation, it provides an option to use the mocking using the junit.Rule. This, however, makes the tests fail.

Recently, there was added another way of running the powermock along arquillian using java agent, so users of this framework will still have hope within forge testing. Haven't tried it yet.



> Adding powermock rule into the test will cause forge to be unable to find it
> ----------------------------------------------------------------------------
>
>                 Key: FORGE-2144
>                 URL: https://issues.jboss.org/browse/FORGE-2144
>             Project: Forge
>          Issue Type: Bug
>            Reporter: Matej Briskar
>
> Powermock is a framework for mocking static methods (this is a tricky thing to do). By default you will run it using @RunWith annotation, however since the arquillian has it's own @RunWith(Arquillian.class) annotation, it provides an option to use the mocking using the junit.Rule. This, however, makes the tests fail.
> The difference is in the  registry.getExportedInstance() for the _DEFAULT_ addon. In one it returns the class, in the other it does not.
> Recently, there was added another way of running the powermock along arquillian using java agent, so users of this framework will still have hope within forge testing. Haven't tried it yet.



--
This message was sent by Atlassian JIRA
(v6.3.8#6338)


More information about the forge-issues mailing list