You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Georg Sorst <g....@findologic.com> on 2016/04/24 17:34:34 UTC
Mockito issues with private SolrTestCaseJ4.beforeClass
Hi list,
I just ran into some issues with Mockito and SolrTestCaseJ4. It looks like
this:
* Mockito requires all @BeforeClass methods in the class hierarchy to be
"public static void"
* SolrTestCaseJ4.beforeClass (which is @BeforeClass) is "private static
void"
* So I cannot use Mockito as a test runner when my tests are derived from
SolrTestCaseJ4
Is there a specific reason why it is private? Am I missing something? I'll
gladly open a JIRA issue if someone can confirm that there is no good
reason for it.
Best,
Georg
--
*Georg M. Sorst I CTO*
FINDOLOGIC GmbH
Jakob-Haringer-Str. 5a | 5020 Salzburg I T.: +43 662 456708
E.: g.sorst@findologic.com
www.findologic.com Folgen Sie uns auf: XING
<https://www.xing.com/profile/Georg_Sorst>facebook
<https://www.facebook.com/Findologic> Twitter
<https://twitter.com/findologic>
Wir sehen uns auf dem *Shopware Community Day in Ahaus am 20.05.2016!* Hier
<beratung@findologic.com?subject=Terminvereinbarung%20SCD> Termin
vereinbaren!
Wir sehen uns auf der* dmexco in Köln am 14.09. und 15.09.2016!* Hier
<beratung@findologic.com?subject=Terminvereinbarung%20dmexco> Termin
vereinbaren!
Re: Mockito issues with private SolrTestCaseJ4.beforeClass
Posted by Georg Sorst <g....@findologic.com>.
Anyway, this is now SOLR-9081.
Best,
Georg
Georg Sorst <g....@findologic.com> schrieb am So., 24. Apr. 2016 um
17:34 Uhr:
> Hi list,
>
> I just ran into some issues with Mockito and SolrTestCaseJ4. It looks like
> this:
>
> * Mockito requires all @BeforeClass methods in the class hierarchy to be
> "public static void"
> * SolrTestCaseJ4.beforeClass (which is @BeforeClass) is "private static
> void"
> * So I cannot use Mockito as a test runner when my tests are derived from
> SolrTestCaseJ4
>
> Is there a specific reason why it is private? Am I missing something? I'll
> gladly open a JIRA issue if someone can confirm that there is no good
> reason for it.
>
> Best,
> Georg
> --
> *Georg M. Sorst I CTO*
> FINDOLOGIC GmbH
>
>
>
> Jakob-Haringer-Str. 5a | 5020 Salzburg I T.: +43 662 456708
> E.: g.sorst@findologic.com
> www.findologic.com Folgen Sie uns auf: XING
> <https://www.xing.com/profile/Georg_Sorst>facebook
> <https://www.facebook.com/Findologic> Twitter
> <https://twitter.com/findologic>
>
> Wir sehen uns auf dem *Shopware Community Day in Ahaus am 20.05.2016!*
> Hier <beratung@findologic.com?subject=Terminvereinbarung%20SCD> Termin
> vereinbaren!
> Wir sehen uns auf der* dmexco in Köln am 14.09. und 15.09.2016!* Hier
> <beratung@findologic.com?subject=Terminvereinbarung%20dmexco> Termin
> vereinbaren!
>
--
*Georg M. Sorst I CTO*
FINDOLOGIC GmbH
Jakob-Haringer-Str. 5a | 5020 Salzburg I T.: +43 662 456708
E.: g.sorst@findologic.com
www.findologic.com Folgen Sie uns auf: XING
<https://www.xing.com/profile/Georg_Sorst>facebook
<https://www.facebook.com/Findologic> Twitter
<https://twitter.com/findologic>
Wir sehen uns auf dem *Shopware Community Day in Ahaus am 20.05.2016!* Hier
<beratung@findologic.com?subject=Terminvereinbarung%20SCD> Termin
vereinbaren!
Wir sehen uns auf der* dmexco in Köln am 14.09. und 15.09.2016!* Hier
<beratung@findologic.com?subject=Terminvereinbarung%20dmexco> Termin
vereinbaren!