-
-
Notifications
You must be signed in to change notification settings - Fork 7
Initial refactoring WIP #20
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
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
6795d78
Initial refactoring
jabrena be30ab2
Improving a bit the coverage
jabrena 55d044d
Upgrade to Java 17
jabrena 38696fa
Fix ci
jabrena 54bb2a6
Update CI Step
jabrena a9f9bfb
Simplify main
jabrena 84f5672
Improving Unit tests
jabrena ada8cd3
Adding more tests
jabrena e252478
Minor refactoring
jabrena 8060918
Minor update
jabrena 7af957d
Simplify the package design
jabrena File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| # EditorConfig is awesome: https://EditorConfig.org | ||
|
|
||
| # File generated by jbang setup@jabrena | ||
|
|
||
| # top-most EditorConfig file | ||
| root = true | ||
|
|
||
| [*] | ||
| charset = utf-8 | ||
| end_of_line = lf | ||
| insert_final_newline = true | ||
| trim_trailing_whitespace = true | ||
|
|
||
| [*.html] | ||
| indent_style = space | ||
| indent_size = 4 | ||
|
|
||
| [*.json] | ||
| indent_style = space | ||
| indent_size = 4 | ||
|
|
||
| [*.xml] | ||
| indent_style = space | ||
| indent_size = 4 | ||
|
|
||
| [*.java] | ||
| indent_style = space | ||
| indent_size = 4 | ||
|
|
||
| [*.yml,*.yaml] | ||
| indent_style = space | ||
| indent_size = 2 | ||
|
|
||
| [*.dsl] | ||
| indent_style = space | ||
| indent_size = 4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,32 +1,4 @@ | ||
| # Compiled class file | ||
| *.class | ||
| **/target | ||
| **/out | ||
|
|
||
| # Build | ||
| /build | ||
| build/ | ||
| .gradle/ | ||
|
|
||
| # Log file | ||
| *.log | ||
|
|
||
| # BlueJ files | ||
| *.ctxt | ||
|
|
||
| # Mobile Tools for Java (J2ME) | ||
| .mtj.tmp/ | ||
|
|
||
| # Package Files # | ||
| *.jar | ||
| *.war | ||
| *.nar | ||
| *.ear | ||
| *.zip | ||
| *.tar.gz | ||
| *.rar | ||
|
|
||
| # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml | ||
| hs_err_pid* | ||
|
|
||
| # IntelliJ | ||
| /.idea | ||
| .cursor/ | ||
| .DS_Store |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| java=17.0.9-graalce |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| Feature: Context Mapper CLI Usage | ||
jabrena marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| As a user of the Context Mapper CLI | ||
| I want to be able to validate CML files and generate various outputs | ||
| So that I can effectively use the tool for my Domain-Driven Design modeling. | ||
|
|
||
| Background: | ||
| Given the Context Mapper CLI is installed | ||
|
|
||
| Scenario: Display help for the validate command | ||
| When I run the command `./cm validate -h` | ||
| Then the output should contain: | ||
| """ | ||
| Context Mapper CLI | ||
| usage: cm validate | ||
| -h,--help Prints this message. | ||
| -i,--input <arg> Path to the CML file which you want to validate. | ||
| """ | ||
|
|
||
| Scenario: Validate a CML file | ||
| Given a CML file named "DDD-Sample.cml" exists | ||
| When I run the command `./cm validate -i DDD-Sample.cml` | ||
| Then the CLI should validate "DDD-Sample.cml" successfully | ||
|
|
||
| Scenario: Display help for the generate command | ||
| When I run the command `./cm generate -h` | ||
| Then the output should contain: | ||
| """ | ||
| Context Mapper CLI | ||
| usage: cm generate | ||
| -f,--outputFile <arg> The name of the file that shall be generated | ||
| (only used by Freemarker generator, as we cannot | ||
| know the file extension). | ||
| -g,--generator <arg> The generator you want to call. Use one of the | ||
| following values: context-map (Graphical DDD | ||
| Context Map), plantuml (PlantUML class-, | ||
| component-, and state diagrams.), generic | ||
| (Generate generic text with Freemarker template) | ||
| -h,--help Prints this message. | ||
| -i,--input <arg> Path to the CML file for which you want to | ||
| generate output. | ||
| -o,--outputDir <arg> Path to the directory into which you want to | ||
| generate. | ||
| -t,--template <arg> Path to the Freemarker template you want to use. | ||
| This parameter is only used if you pass 'generic' | ||
| to the 'generator' (-g) parameter. | ||
| """ | ||
|
|
||
| Scenario: Generate PlantUML output | ||
| Given a CML file named "DDD-Sample.cml" exists | ||
| And an output directory named "output-directory" | ||
| When I run the command `./cm generate -i DDD-Sample.cml -g plantuml -o ./output-directory` | ||
| Then PlantUML diagrams should be generated in "./output-directory" from "DDD-Sample.cml" | ||
|
|
||
| Scenario: Generate Context Map output | ||
| Given a CML file named "DDD-Sample.cml" exists | ||
| And an output directory named "output-directory" | ||
| When I run the command `./cm generate -i DDD-Sample.cml -g context-map -o ./output-directory` | ||
| Then a Context Map should be generated in "./output-directory" from "DDD-Sample.cml" | ||
|
|
||
| Scenario: Generate arbitrary text file with Freemarker template | ||
| Given a CML file named "DDD-Sample.cml" exists | ||
| And an output directory named "output-directory" | ||
| And a Freemarker template file named "template.md.ftl" | ||
| When I run the command `./cm generate -i DDD-Sample.cml -g generic -o ./output-directory -t template.md.ftl -f glossary.md` | ||
| Then a file named "glossary.md" should be generated in "./output-directory" using "template.md.ftl" and "DDD-Sample.cml" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.