lundi 9 mars 2015

Eclipse Scout client unit tests with ScoutClientTestRunner

I am trying to create unit test with scout context and I can't find proper tutorial or example for it.


When I create test with ScoutClientTestRunner, I get error



java.lang.Exception: Client session class is not set. Either set the default client session using 'ScoutClientTestRunner.setDefaultClientSessionClass' or annotate your test class and/or method with 'ClientTest'


I try to set client session class like this :



@Before
public void setClassSession() throws Exception {

ScoutClientTestRunner.setDefaultClientSessionClass(ClientSession.class)
}


and



@BeforeClass
public void setClassSession() throws Exception {

ScoutClientTestRunner.setDefaultClientSessionClass(ClientSession.class);
}


I try to add @ClientTest to the class and to all methods but I still get same error.


How to set client session in tests if you use ScoutClientTestRunner ?


Aucun commentaire:

Enregistrer un commentaire