-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tests for Structurizr JSON parser were added
- Loading branch information
1 parent
48a6c9e
commit 3e4e11c
Showing
6 changed files
with
400 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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 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
69 changes: 69 additions & 0 deletions
69
tests/StructurizrParser.Tests/ArchitectureFiles/musicality-labs.dsl
This file contains 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,69 @@ | ||
workspace { | ||
|
||
model { | ||
|
||
changesMQ = element "musicality_labs.data.changes" "RabbitMQ" { | ||
tags "MQ" | ||
} | ||
|
||
storage = softwareSystem "Storage" { | ||
storageWorker = container "Storage Worker" { | ||
tags "Worker" | ||
technology ".NET Core" | ||
url "https://github.com/MusicalityLabs/musicality-labs-storage-worker" | ||
} | ||
storageApi = container "Storage Api" { | ||
tags "WebApi" | ||
technology ".NET Core" | ||
url "https://github.com/MusicalityLabs/musicality-labs-storage-api" | ||
|
||
storageWorker -> this "Changes" "REST" "Sync" | ||
} | ||
storageDatabase = container "storageapi" { | ||
tags "Database" | ||
technology "PostgreSQL" | ||
|
||
storageApi -> this "Changes" "SQL" "Sync" | ||
} | ||
} | ||
|
||
changesMQ -> storageWorker "Changes" "AMQP" "Async" | ||
} | ||
|
||
views { | ||
systemLandscape { | ||
include * | ||
autolayout lr | ||
} | ||
|
||
container storage { | ||
include * | ||
autolayout lr | ||
} | ||
|
||
styles { | ||
element "ExternalSystem" { | ||
background #7f7f7f | ||
} | ||
element "Database" { | ||
shape cylinder | ||
} | ||
element "MQ" { | ||
shape pipe | ||
} | ||
relationship "Sync" { | ||
dashed false | ||
} | ||
relationship "Async" { | ||
dashed true | ||
} | ||
relationship "TechDebt" { | ||
color red | ||
} | ||
} | ||
|
||
theme default | ||
|
||
} | ||
|
||
} |
209 changes: 209 additions & 0 deletions
209
tests/StructurizrParser.Tests/ArchitectureFiles/musicality-labs.json
This file contains 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,209 @@ | ||
{ | ||
"configuration" : { }, | ||
"description" : "Description", | ||
"documentation" : { }, | ||
"id" : 1, | ||
"lastModifiedAgent" : "structurizr-javascript", | ||
"lastModifiedDate" : "2024-06-27T18:15:36Z", | ||
"model" : { | ||
"customElements" : [ { | ||
"id" : "1", | ||
"metadata" : "RabbitMQ", | ||
"name" : "musicality_labs.data.changes", | ||
"properties" : { | ||
"structurizr.dsl.identifier" : "changesmq" | ||
}, | ||
"relationships" : [ { | ||
"description" : "Changes", | ||
"destinationId" : "3", | ||
"id" : "8", | ||
"properties" : { | ||
"structurizr.dsl.identifier" : "cd68ff6f-c752-46dd-8e1f-b23e59be94b1" | ||
}, | ||
"sourceId" : "1", | ||
"tags" : "Relationship,Async", | ||
"technology" : "AMQP" | ||
}, { | ||
"description" : "Changes", | ||
"destinationId" : "2", | ||
"id" : "9", | ||
"linkedRelationshipId" : "8", | ||
"sourceId" : "1", | ||
"technology" : "AMQP" | ||
} ], | ||
"tags" : "Element,MQ" | ||
} ], | ||
"softwareSystems" : [ { | ||
"containers" : [ { | ||
"documentation" : { }, | ||
"id" : "3", | ||
"name" : "Storage Worker", | ||
"properties" : { | ||
"structurizr.dsl.identifier" : "storageworker" | ||
}, | ||
"relationships" : [ { | ||
"description" : "Changes", | ||
"destinationId" : "4", | ||
"id" : "5", | ||
"properties" : { | ||
"structurizr.dsl.identifier" : "640e21c6-67d2-4c8f-96ba-abcb80762a5f" | ||
}, | ||
"sourceId" : "3", | ||
"tags" : "Relationship,Sync", | ||
"technology" : "REST" | ||
} ], | ||
"tags" : "Element,Container,Worker", | ||
"technology" : ".NET Core", | ||
"url" : "https://github.com/MusicalityLabs/musicality-labs-storage-worker" | ||
}, { | ||
"documentation" : { }, | ||
"id" : "4", | ||
"name" : "Storage Api", | ||
"properties" : { | ||
"structurizr.dsl.identifier" : "storageapi" | ||
}, | ||
"relationships" : [ { | ||
"description" : "Changes", | ||
"destinationId" : "6", | ||
"id" : "7", | ||
"properties" : { | ||
"structurizr.dsl.identifier" : "55219b68-88b9-49c8-9003-903725a1b00b" | ||
}, | ||
"sourceId" : "4", | ||
"tags" : "Relationship,Sync", | ||
"technology" : "SQL" | ||
} ], | ||
"tags" : "Element,Container,WebApi", | ||
"technology" : ".NET Core", | ||
"url" : "https://github.com/MusicalityLabs/musicality-labs-storage-api" | ||
}, { | ||
"documentation" : { }, | ||
"id" : "6", | ||
"name" : "storageapi", | ||
"properties" : { | ||
"structurizr.dsl.identifier" : "storagedatabase" | ||
}, | ||
"tags" : "Element,Container,Database", | ||
"technology" : "PostgreSQL" | ||
} ], | ||
"documentation" : { }, | ||
"id" : "2", | ||
"location" : "Unspecified", | ||
"name" : "Storage", | ||
"properties" : { | ||
"structurizr.dsl.identifier" : "storage" | ||
}, | ||
"tags" : "Element,Software System" | ||
} ] | ||
}, | ||
"name" : "Name", | ||
"properties" : { | ||
"structurizr.dsl" : "d29ya3NwYWNlIHsKCiAgICBtb2RlbCB7CiAgICAgICAgCiAgICAgICAgY2hhbmdlc01RID0gZWxlbWVudCAibXVzaWNhbGl0eV9sYWJzLmRhdGEuY2hhbmdlcyIgIlJhYmJpdE1RIiB7CiAgICAgICAgICAgIHRhZ3MgIk1RIiAKICAgICAgICB9CiAgICAgICAgCiAgICAgICAgc3RvcmFnZSA9IHNvZnR3YXJlU3lzdGVtICJTdG9yYWdlIiB7CiAgICAgICAgICAgIHN0b3JhZ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gc3RvcmFnZSB7CiAgICAgICAgICAgIGluY2x1ZGUgKgogICAgICAgICAgICBhdXRvbGF5b3V0IGxyCiAgICAgICAgfQoJCSAgICAgICAgCiAgICAgICAgc3R5bGVzIHsKICAgICAgICAgICAgZWxlbWVudCAiRXh0ZXJuYWxTeXN0ZW0iIHsKICAgICAgICAgICAgICAgIGJhY2tncm91bmQgIzdmN2Y3ZgogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsZW1lbnQgIkRhdGFiYXNlIiB7CiAgICAgICAgICAgICAgICBzaGFwZSBjeWxpbmRlcgogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsZW1lbnQgIk1RIiB7CiAgICAgICAgICAgICAgICBzaGFwZSBwaXBlCiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmVsYXRpb25zaGlwICJTeW5jIiB7CiAgICAgICAgICAgICAgICBkYXNoZWQgZmFsc2UKICAgICAgICAgICAgfQoJCQlyZWxhdGlvbnNoaXAgIkFzeW5jIiB7CiAgICAgICAgICAgICAgICBkYXNoZWQgdHJ1ZQogICAgICAgICAgICB9CgkJCXJlbGF0aW9uc2hpcCAiVGVjaERlYnQiIHsKCQkJCWNvbG9yIHJlZAoJCQl9CiAgICAgICAgfQogICAgICAgCiAgICAgICAgdGhlbWUgZGVmYXVsdAoKICAgIH0KICAgIAp9Cg==" | ||
}, | ||
"views" : { | ||
"configuration" : { | ||
"branding" : { }, | ||
"lastSavedView" : "Container-001", | ||
"metadataSymbols" : "SquareBrackets", | ||
"styles" : { | ||
"elements" : [ { | ||
"background" : "#7f7f7f", | ||
"tag" : "ExternalSystem" | ||
}, { | ||
"shape" : "Cylinder", | ||
"tag" : "Database" | ||
}, { | ||
"shape" : "Pipe", | ||
"tag" : "MQ" | ||
} ], | ||
"relationships" : [ { | ||
"dashed" : false, | ||
"tag" : "Sync" | ||
}, { | ||
"dashed" : true, | ||
"tag" : "Async" | ||
}, { | ||
"color" : "#ff0000", | ||
"tag" : "TechDebt" | ||
} ] | ||
}, | ||
"terminology" : { }, | ||
"themes" : [ "https://static.structurizr.com/themes/default/theme.json" ] | ||
}, | ||
"containerViews" : [ { | ||
"automaticLayout" : { | ||
"applied" : true, | ||
"edgeSeparation" : 0, | ||
"implementation" : "Graphviz", | ||
"nodeSeparation" : 300, | ||
"rankDirection" : "LeftRight", | ||
"rankSeparation" : 300, | ||
"vertices" : false | ||
}, | ||
"dimensions" : { | ||
"height" : 811, | ||
"width" : 3120 | ||
}, | ||
"elements" : [ { | ||
"id" : "1", | ||
"x" : 199, | ||
"y" : 219 | ||
}, { | ||
"id" : "3", | ||
"x" : 949, | ||
"y" : 219 | ||
}, { | ||
"id" : "4", | ||
"x" : 1699, | ||
"y" : 219 | ||
}, { | ||
"id" : "6", | ||
"x" : 2449, | ||
"y" : 219 | ||
} ], | ||
"externalSoftwareSystemBoundariesVisible" : false, | ||
"generatedKey" : true, | ||
"key" : "Container-001", | ||
"order" : 2, | ||
"relationships" : [ { | ||
"id" : "5" | ||
}, { | ||
"id" : "7" | ||
}, { | ||
"id" : "8" | ||
} ], | ||
"softwareSystemId" : "2" | ||
} ], | ||
"systemLandscapeViews" : [ { | ||
"automaticLayout" : { | ||
"applied" : true, | ||
"edgeSeparation" : 0, | ||
"implementation" : "Graphviz", | ||
"nodeSeparation" : 300, | ||
"rankDirection" : "LeftRight", | ||
"rankSeparation" : 300, | ||
"vertices" : false | ||
}, | ||
"dimensions" : { | ||
"height" : 700, | ||
"width" : 1600 | ||
}, | ||
"elements" : [ { | ||
"id" : "1", | ||
"x" : 200, | ||
"y" : 200 | ||
}, { | ||
"id" : "2", | ||
"x" : 950, | ||
"y" : 200 | ||
} ], | ||
"enterpriseBoundaryVisible" : true, | ||
"generatedKey" : true, | ||
"key" : "SystemLandscape-001", | ||
"order" : 1, | ||
"relationships" : [ { | ||
"id" : "9" | ||
} ] | ||
} ] | ||
} | ||
} |
Oops, something went wrong.