Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All scenario resolution in test context #974

Merged
merged 16 commits into from Oct 9, 2016

Conversation

@fhoeben
Copy link
Collaborator

@fhoeben fhoeben commented Sep 17, 2016

This pull request moves all scenario resolution logic to the slim test context.
Furthermore it only creates the pattern to match a single cell scenario call with parameters once, instead of each time the scenario is evaluated to determine whether it matches.

Copy link
Collaborator

@amolenaar amolenaar left a comment

Looks good.

@@ -18,6 +18,8 @@

ScenarioTable getScenario(String scenarioName);

ScenarioTable getScenarioByPatternMatching(String invokingString, CustomComparatorRegistry customComparatorRegistry);
Copy link
Collaborator

@amolenaar amolenaar Sep 17, 2016

I think getScenarioByPattern is a more appropriate name.

@@ -330,6 +334,11 @@ public ScenarioTable getScenario(String scenarioName) {
}

@Override
public ScenarioTable getScenarioByPatternMatching(String invokingString, CustomComparatorRegistry customComparatorRegistry) {
Copy link
Collaborator

@amolenaar amolenaar Sep 17, 2016

Same method rename here.

fhoeben added 4 commits Sep 17, 2016
… a few of the elements must be re-ordered. In this case only the scenarios added since the last time we sorted.
@fhoeben
Copy link
Collaborator Author

@fhoeben fhoeben commented Sep 17, 2016

Renamed as suggested, and added small optimization: no need to sort the scenarios for each lookup

fhoeben added 7 commits Sep 18, 2016
…ased on single cell parsing (the ones without arguments are found based on their name alone)
…or hashmap and 8 for list) since the number of scenarios could be much larger and resizing collections is much more expensive than having/allocating larger ones for each test.
…s needed (i.e. the first time a single cell script table row is encountered)
@amolenaar amolenaar added this to the Next Release milestone Sep 28, 2016
@amolenaar amolenaar merged commit 640876b into unclebob:master Oct 9, 2016
amolenaar added a commit that referenced this issue Oct 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants