Skip to content

Commit

Permalink
Adding tests with new format
Browse files Browse the repository at this point in the history
  • Loading branch information
hyakuhei committed Jul 24, 2021
1 parent 1cfc042 commit 6de1c2e
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 19 deletions.
12 changes: 7 additions & 5 deletions tests/test_dfds.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,21 @@
# Be careful with these, they have to be tabs, not spaces
expectedResults = {
"Test ABC": """digraph "Test ABC" {
color=blue rankdir=LR
node [fontname=Arial fontsize=14]
color=blue fontname=Arial rankdir=LR
node [fontname=Arial fontsize=11 shape=box style=rounded]
edge [fontname=Arial fontsize=11]
A
B
C
A -> B [label="(1) Edge 1"]
B -> C [label="(2) Edge 2"]
}""",
"Test DEInOneBoundary": """digraph "Test DEInOneBoundary" {
color=blue rankdir=LR
node [fontname=Arial fontsize=14]
color=blue fontname=Arial rankdir=LR
node [fontname=Arial fontsize=11 shape=box style=rounded]
edge [fontname=Arial fontsize=11]
subgraph cluster_BOUNDARY {
graph [color=red fontname=Arial fontsize=12 label=BOUNDARY line=dotted]
graph [color=red fontname=Arial fontsize=11 label=BOUNDARY style=dashed]
D
E
}
Expand Down
9 changes: 5 additions & 4 deletions tests/test_inline_declaration.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,15 @@

expectedResults = {
"Warehouse packages order": """digraph "Warehouse packages order" {
color=blue rankdir=LR
node [fontname=Arial fontsize=14]
color=blue fontname=Arial rankdir=LR
node [fontname=Arial fontsize=11 shape=box style=rounded]
edge [fontname=Arial fontsize=11]
subgraph cluster_Logistics {
graph [color=red fontname=Arial fontsize=12 label=Logistics line=dotted]
graph [color=red fontname=Arial fontsize=11 label=Logistics style=dashed]
"Order Resolver"
}
subgraph cluster_Warehouse {
graph [color=red fontname=Arial fontsize=12 label=Warehouse line=dotted]
graph [color=red fontname=Arial fontsize=11 label=Warehouse style=dashed]
"Label Printer"
"Warehouse Notifier"
}
Expand Down
22 changes: 12 additions & 10 deletions tests/test_variables_dfd.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,17 @@

expectedResults = {
"Customer views book online": """digraph "Customer views book online" {
color=blue rankdir=LR
node [fontname=Arial fontsize=14]
color=blue fontname=Arial rankdir=LR
node [fontname=Arial fontsize=11 shape=box style=rounded]
edge [fontname=Arial fontsize=11]
subgraph cluster_Internet {
graph [color=red fontname=Arial fontsize=12 label=Internet line=dotted]
graph [color=red fontname=Arial fontsize=11 label=Internet style=dashed]
Customer
}
subgraph "cluster_BookStore Co" {
graph [color=red fontname=Arial fontsize=12 label="BookStore Co" line=dotted]
graph [color=red fontname=Arial fontsize=11 label="BookStore Co" style=dashed]
subgraph "cluster_Front End Systems" {
graph [color=red fontname=Arial fontsize=12 label="Front End Systems" line=dotted]
graph [color=red fontname=Arial fontsize=11 label="Front End Systems" style=dashed]
"Web Server"
}
}
Expand All @@ -79,16 +80,17 @@
"Web Server" -> Customer [label="(6) Rendered Item Information"]
}""",
"Customer buys book": """digraph "Customer buys book" {
color=blue rankdir=LR
node [fontname=Arial fontsize=14]
color=blue fontname=Arial rankdir=LR
node [fontname=Arial fontsize=11 shape=box style=rounded]
edge [fontname=Arial fontsize=11]
subgraph cluster_Internet {
graph [color=red fontname=Arial fontsize=12 label=Internet line=dotted]
graph [color=red fontname=Arial fontsize=11 label=Internet style=dashed]
Customer
}
subgraph "cluster_BookStore Co" {
graph [color=red fontname=Arial fontsize=12 label="BookStore Co" line=dotted]
graph [color=red fontname=Arial fontsize=11 label="BookStore Co" style=dashed]
subgraph "cluster_Front End Systems" {
graph [color=red fontname=Arial fontsize=12 label="Front End Systems" line=dotted]
graph [color=red fontname=Arial fontsize=11 label="Front End Systems" style=dashed]
"Web Server"
}
}
Expand Down

0 comments on commit 6de1c2e

Please sign in to comment.