@Test public void should_return_Suite_Setup_proposal_for_relevant_prefixes() { for (String attempt : new String[] { "suite s", "suite setup" }) { RobotCompletionProposalSet proposalSet = visitor.visitAttempt(attempt, replacementRegion); verifyExpectedProposals(attempt, proposalSet, "Suite Setup"); } }
@Override public RobotCompletionProposalSet visitAttempt(String attempt, IRegion replacementRegion) { assert attempt.equals(attempt.toLowerCase()); RobotCompletionProposalSet ourProposalSet = new RobotCompletionProposalSet(); for (String key : settingKeys) { if (key.toLowerCase().startsWith(attempt)) { String proposal = key; Image image = null; String displayString = key; String additionalProposalInfo = null; String informationDisplayString = null; ourProposalSet.getProposals().add(new RobotCompletionProposal(proposal, null, replacementRegion, image, displayString, informationDisplayString, additionalProposalInfo)); } } return ourProposalSet; }
SettingTableAttemptVisitor implements AttemptVisitor { @Override public RobotCompletionProposalSet visitAttempt(String attempt, IRegion replacementRegion) { assert attempt.equals(attempt.toLowerCase()); RobotCompletionProposalSet ourProposalSet = new RobotCompletionProposalSet(); for (String key : settingKeys) { if (key.toLowerCase().startsWith(attempt)) { String proposal = key; Image image = null; String displayString = key; String additionalProposalInfo = null; String informationDisplayString = null; ourProposalSet.getProposals().add(new RobotCompletionProposal(proposal, null, replacementRegion, image, displayString, informationDisplayString, additionalProposalInfo)); } } return ourProposalSet; } }
SettingTableAttemptVisitor implements AttemptVisitor { @Override public RobotCompletionProposalSet visitAttempt(String attempt, IRegion replacementRegion) { assert attempt.equals(attempt.toLowerCase()); RobotCompletionProposalSet ourProposalSet = new RobotCompletionProposalSet(); for (String key : settingKeys) { if (key.toLowerCase().startsWith(attempt)) { String proposal = key; Image image = null; String displayString = key; String additionalProposalInfo = null; String informationDisplayString = null; ourProposalSet.getProposals().add(new RobotCompletionProposal(proposal, null, replacementRegion, image, displayString, informationDisplayString, additionalProposalInfo)); } } return ourProposalSet; } SettingTableAttemptVisitor(); }
SettingTableAttemptVisitor implements AttemptVisitor { @Override public RobotCompletionProposalSet visitAttempt(String attempt, IRegion replacementRegion) { assert attempt.equals(attempt.toLowerCase()); RobotCompletionProposalSet ourProposalSet = new RobotCompletionProposalSet(); for (String key : settingKeys) { if (key.toLowerCase().startsWith(attempt)) { String proposal = key; Image image = null; String displayString = key; String additionalProposalInfo = null; String informationDisplayString = null; ourProposalSet.getProposals().add(new RobotCompletionProposal(proposal, null, replacementRegion, image, displayString, informationDisplayString, additionalProposalInfo)); } } return ourProposalSet; } SettingTableAttemptVisitor(); @Override RobotCompletionProposalSet visitAttempt(String attempt, IRegion replacementRegion); }
SettingTableAttemptVisitor implements AttemptVisitor { @Override public RobotCompletionProposalSet visitAttempt(String attempt, IRegion replacementRegion) { assert attempt.equals(attempt.toLowerCase()); RobotCompletionProposalSet ourProposalSet = new RobotCompletionProposalSet(); for (String key : settingKeys) { if (key.toLowerCase().startsWith(attempt)) { String proposal = key; Image image = null; String displayString = key; String additionalProposalInfo = null; String informationDisplayString = null; ourProposalSet.getProposals().add(new RobotCompletionProposal(proposal, null, replacementRegion, image, displayString, informationDisplayString, additionalProposalInfo)); } } return ourProposalSet; } SettingTableAttemptVisitor(); @Override RobotCompletionProposalSet visitAttempt(String attempt, IRegion replacementRegion);  }