private void checkAllDefaultParametersValues(SWTBotTreeItem[] parameters) { assertThat("Default value of id is wrong", dialog.getParameterValue(parameters[0]), Is.is("0")); assertThat( "Default value of id is wrong", dialog.getParameterValue(parameters[1]), Is.is("m1")); assertThat( "Default value of id is wrong", dialog.getParameterValue(parameters[2]), Is.is("q1")); }
private void checkAllParametersTypes(SWTBotTreeItem[] parameters) { assertThat( "Type of id is wrong", dialog.getParameterType(parameters[0]), Is.is("java.lang.Integer")); assertThat( "Type of m1 is wrong", dialog.getParameterType(parameters[1]), Is.is("java.lang.String")); assertThat( "Type of q1 is wrong", dialog.getParameterType(parameters[2]), Is.is("java.lang.String")); }
private void checkAllParametersWereLoaded(SWTBotTreeItem[] parameters) { assertThat( "First parameter name is wrong", dialog.getParameterName(parameters[0]), Is.is("id")); assertThat( "Second parameter name is wrong", dialog.getParameterName(parameters[1]), Is.is("m1")); assertThat( "Third parameter name is wrong", dialog.getParameterName(parameters[2]), Is.is("q1")); }
private void checkWSParametersDialog() { dialog = new WSTesterParametersDialog(); assertThat(dialog.isOkButtonEnabled(), Is.is(false)); SWTBotTreeItem[] parameters = dialog.getAllParameters(); assertThat(dialog.getAllParameters().length, Is.is(3)); checkAllParametersWereLoaded(parameters); checkAllDefaultParametersValues(parameters); checkAllParametersTypes(parameters); setParametersValues(parameters); assertThat(dialog.isOkButtonEnabled(), Is.is(true)); dialog.ok(); }
@Override public void cleanup() { if (dialog.isOpened()) dialog.cancel(); projectExplorer.deleteAllProjects(); }
private void setParametersValues(SWTBotTreeItem[] parameters) { dialog.setParameterValue(parameters[0], "1"); dialog.setParameterValue(parameters[1], "matrix"); dialog.setParameterValue(parameters[2], "query"); }