mardi 24 février 2015

How to mock groups and users for a jira plugin

I'm currently in the middle of making an Atlassian Plugin for Jira. To test some of my conditions for my plugin, I'd like to mock a user and a group and check whether that user is in that group or not. However, before the test is run, I want to assign that mocked user to the mocked group. I tried using this to mock it:



Group mockedGroup = Mockito.mock(Group.class);


I also tried making a new group with a mocked GroupManager, but no success either.


Any advice is more than welcome.


Kind regards


Aucun commentaire:

Enregistrer un commentaire