added Go variant

- using homegrown approval test function
This commit is contained in:
Christian Haas
2019-10-06 19:57:02 +02:00
parent 09a3047087
commit b7d9ed303b
10 changed files with 280 additions and 0 deletions

1
go/theatre/testdata/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
*.out.*

View File

@@ -0,0 +1,6 @@
Statement for BigCo
Hamlet: $650.00 (55 seats)
As You Like It: $580.00 (35 seats)
Othello: $500.00 (40 seats)
Amount owed is $1,730.00
You earned 47 credits

View File

@@ -0,0 +1,15 @@
{
"plays": [
{ "id": "hamlet", "play": { "name": "Hamlet", "type": "tragedy" } },
{ "id": "as-like", "play": { "name": "As You Like It", "type": "comedy" } },
{ "id": "othello", "play": { "name": "Othello", "type": "tragedy" } }
],
"invoice": {
"customer": "BigCo",
"performances": [
{"playId": "hamlet", "audience": 55 },
{"playId": "as-like", "audience": 35 },
{"playId": "othello", "audience": 40 }
]
}
}