I have the following code, but I'm looking for a way to make the code read easier.
public void synchronizePageAndExcecuteVerifyNode() throws Exception {
String nameTestcase = this.getClass().getSimpleName();
WriteTo.testgoal(nameTestcase, TestgoalState.nvt, "");
Boolean testDataGenerated = eventTestData.eventDetailMultipleDays;
Boolean currentPage = driver.getTitle().contains(Value.TITLE_EVENT_MULTIPLE_DAYS);
if (testDataGenerated == true) {
if(currentPage == true){
this.verifyEventDetailFull();
}else{
WriteTo.testgoal(nameTestcase, TestgoalState.NOK,
"Page synchronize failed");
throw new Exception("PAGE SYNCHRONIZE FAILED");
}
} else {
WriteTo.testgoal(nameTestcase, TestgoalState.NOK,
"testdata is not generated");
throw new Exception("NO TESTDATA GENERATED");
}
}