I am tasked with trying to create a Junit test suite of a class which extends 'WizardPage'.
public class PageDataModel extends WizardPage
Every time I try and create an object of this class within my test suit, the value of the page is null. Below is an example of a test I'm trying to execute.
@Test
public void testEntityNameNotNumber() {
PageDataModel pageDataModel = new PageDataModel("testing");
pageDataModel.setContents("person");
String temp = pageDataModel.getContents();
assertEquals("person",temp );
}
Could someone please suggest where I'm wrong. Many thanks.
Aucun commentaire:
Enregistrer un commentaire