Commit b262eb5e authored by Romain Bioteau's avatar Romain Bioteau
Browse files

Merge pull request #361 from bonitasoft/fix/changeInputNameToCamelCase

change input suffix from *_input to *Input and *_doc_input to
parents 20e4007d 3f1b4181
...@@ -146,7 +146,7 @@ public class ContractInputGenerationWizardTest { ...@@ -146,7 +146,7 @@ public class ContractInputGenerationWizardTest {
wizard.setContainer(wizardContainer); wizard.setContainer(wizardContainer);
wizard.createPageControls(realmWithDisplay.createComposite()); wizard.createPageControls(realmWithDisplay.createComposite());
wizard.performFinish(); wizard.performFinish();
assertThat(process.getContract().getInputs()).extracting("name").contains("employee_input"); assertThat(process.getContract().getInputs()).extracting("name").contains("employeeInput");
assertThat(process.getContract().getInputs().get(0).getInputs()).extracting("name").contains("firstName"); assertThat(process.getContract().getInputs().get(0).getInputs()).extracting("name").contains("firstName");
} }
...@@ -293,7 +293,7 @@ public class ContractInputGenerationWizardTest { ...@@ -293,7 +293,7 @@ public class ContractInputGenerationWizardTest {
assertThat(task.getContract().getInputs().get(0).getType()).isEqualTo(ContractInputType.FILE); assertThat(task.getContract().getInputs().get(0).getType()).isEqualTo(ContractInputType.FILE);
assertThat(task.getOperations().get(0).getLeftOperand().getName()).isEqualTo("myDocument"); assertThat(task.getOperations().get(0).getLeftOperand().getName()).isEqualTo("myDocument");
assertThat(task.getOperations().get(0).getRightOperand().getType()).isEqualTo(ExpressionConstants.CONTRACT_INPUT_TYPE); assertThat(task.getOperations().get(0).getRightOperand().getType()).isEqualTo(ExpressionConstants.CONTRACT_INPUT_TYPE);
assertThat(task.getOperations().get(0).getRightOperand().getName()).isEqualTo("myDocument_doc_input"); assertThat(task.getOperations().get(0).getRightOperand().getName()).isEqualTo("myDocumentDocumentInput");
} }
@Test @Test
...@@ -341,7 +341,7 @@ public class ContractInputGenerationWizardTest { ...@@ -341,7 +341,7 @@ public class ContractInputGenerationWizardTest {
@Test @Test
public void should_canFinish_return_true_when_data_is_selected() { public void should_canFinish_return_true_when_data_is_selected() {
final Pool process = aPool().havingContract(aContract()).build(); final Pool process = aPool().havingContract(aContract()).build();
final BusinessObjectData data = aBusinessData().withClassname("com.company.Employee").build(); final BusinessObjectData data = aBusinessData().withName("employee").withClassname("com.company.Employee").build();
process.getData().add(data); process.getData().add(data);
final BusinessObjectModelRepositoryStore store = mock(BusinessObjectModelRepositoryStore.class); final BusinessObjectModelRepositoryStore store = mock(BusinessObjectModelRepositoryStore.class);
......
...@@ -141,7 +141,7 @@ public class SelectDataWizardPageTest { ...@@ -141,7 +141,7 @@ public class SelectDataWizardPageTest {
rootNameObservable, store); rootNameObservable, store);
page.setWizard(wizardWithContainer()); page.setWizard(wizardWithContainer());
page.createControl(realmWithDisplay.createComposite()); page.createControl(realmWithDisplay.createComposite());
assertThat(rootNameObservable.getValue()).isEqualTo("myData_input"); assertThat(rootNameObservable.getValue()).isEqualTo("myDataInput");
} }
@Test @Test
......
...@@ -82,8 +82,8 @@ import com.google.common.base.Function; ...@@ -82,8 +82,8 @@ import com.google.common.base.Function;
*/ */
public class SelectDataWizardPage extends WizardPage { public class SelectDataWizardPage extends WizardPage {
private static final String INPUT = "_input"; private static final String INPUT = "Input";
private static final String DOC_INPUT = "_doc_input"; private static final String DOC_INPUT = "DocumentInput";
private static final int INPUT_NAME_MAX_LENGTH = 50; private static final int INPUT_NAME_MAX_LENGTH = 50;
List<Data> availableBusinessData; List<Data> availableBusinessData;
final WritableValue selectedDataObservable; final WritableValue selectedDataObservable;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment