You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the TestSuiteParser has too much responsibility. This results in the class being a cluttered mess.
The class should have the single responsibility: 'Parse testsuites'. It should not directly create mocks or generate code - a level of abstraction should exist for this.
A way to do this would be something akin to:
A class for holding the testsuite state
A reader-class that returns tokens and updates the testsuite state
Keyword actions are triggered by specific states
Keyword actions could be of type Consumer<T>, to minimize duplication of code
Keyword actions should actually be utilized
A class or maybe multiple classes should generate cobol code
All of the above is used by TestSuiteParser.getParsedTestSuiteLines, that ties everything together with a simple loop and a switch statement, that triggers keyword actions (with an argument), based on the current state
The above list is a step towards having the TestSuiteParser have a single responsibility. Further steps is required. View the list as a way to get started.
The text was updated successfully, but these errors were encountered:
Currently the TestSuiteParser has too much responsibility. This results in the class being a cluttered mess.
The class should have the single responsibility: 'Parse testsuites'. It should not directly create mocks or generate code - a level of abstraction should exist for this.
A way to do this would be something akin to:
Consumer<T>
, to minimize duplication of codeTestSuiteParser.getParsedTestSuiteLines
, that ties everything together with a simple loop and a switch statement, that triggers keyword actions (with an argument), based on the current stateThe above list is a step towards having the TestSuiteParser have a single responsibility. Further steps is required. View the list as a way to get started.
The text was updated successfully, but these errors were encountered: