Skip to content

[Bank account]: Add canonical data #2192

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 26 commits into from
Mar 26, 2023
Merged
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
4555bc9
Add tests for bank account
meatball133 Feb 1, 2023
ed8bc20
Update comments, fixed spelling mistakes
meatball133 Feb 1, 2023
6bbe283
Moved error and updated the comment
meatball133 Feb 2, 2023
09f11da
added space at the end
meatball133 Feb 2, 2023
b5e4a52
Apply suggestions from code review
meatball133 Feb 2, 2023
b9abfa4
Add additional test
meatball133 Feb 2, 2023
16c6f5b
Removed expect
meatball133 Feb 6, 2023
81f097c
Revert "Removed expect"
meatball133 Feb 6, 2023
4ec1dab
Updated tests
meatball133 Feb 10, 2023
b994a35
Fixed formatting
meatball133 Feb 10, 2023
e5514c5
Apply suggestions from code review
meatball133 Feb 27, 2023
ef45bab
Update exercises/bank-account/canonical-data.json
meatball133 Mar 2, 2023
1e3775d
Apply suggestions from code review
meatball133 Mar 2, 2023
257d20e
added extra test based of Eriks feedback
meatball133 Mar 2, 2023
5bd2808
Added concurrent test case
meatball133 Mar 15, 2023
dad9a34
Fix
meatball133 Mar 15, 2023
cd05c5f
Merge branch 'exercism:main' into add-bank-account
meatball133 Mar 15, 2023
764a961
fix
meatball133 Mar 15, 2023
8d26047
Fix
meatball133 Mar 15, 2023
abf10f4
Update exercises/bank-account/canonical-data.json
ErikSchierboom Mar 16, 2023
efa765e
Added changes based on feedback
meatball133 Mar 16, 2023
105a3c7
Fix
meatball133 Mar 16, 2023
c2c92cd
Updated
meatball133 Mar 17, 2023
8bda70d
Updated
meatball133 Mar 17, 2023
7f8a07c
Update exercises/bank-account/canonical-data.json
meatball133 Mar 20, 2023
8a18f97
Updated based on feedback
meatball133 Mar 21, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 16 additions & 18 deletions exercises/bank-account/canonical-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,7 @@
"comments": [
"This exercise is a good candidate to practice concurrency, which",
"may not be available or possible in the implementing language track.",
"In that case, all tests can be executed on a single thread. If there",
"are tests that don't work using a single thread, these should be",
"marked with a concurrency scenario.",
"----------------------------------------------------------------",
"The overall expected value for the case should be the result of the last operation.",
"If any operation other than the last one also has an expected result,",
"that individual operation should have its expected value/error as a field.",
"For errors that are suppose to raise non fatal errors",
"Should have an extra field called `fatal` which holds a boolean"
"It is possible to implement this exercise without concurrency,"
],
"cases": [
{
Expand All @@ -24,7 +16,7 @@
"operation": "open"
},
{
"operation": "amount"
"operation": "balance"
}
]
},
Expand All @@ -44,7 +36,7 @@
"value": 100
},
{
"operation": "amount"
"operation": "balance"
}
]
},
Expand All @@ -68,7 +60,7 @@
"value": 50
},
{
"operation": "amount"
"operation": "balance"
}
]
},
Expand All @@ -92,7 +84,7 @@
"value": 75
},
{
"operation": "amount"
"operation": "balance"
}
]
},
Expand Down Expand Up @@ -120,7 +112,7 @@
"value": 20
},
{
"operation": "amount"
"operation": "balance"
}
]
},
Expand Down Expand Up @@ -156,7 +148,7 @@
"value": 50
},
{
"operation": "amount"
"operation": "balance"
}
]
},
Expand All @@ -175,7 +167,7 @@
"operation": "close"
},
{
"operation": "amount"
"operation": "balance"
}
]
},
Expand Down Expand Up @@ -284,7 +276,7 @@
"operation": "open"
},
{
"operation": "amount"
"operation": "balance"
}
]
},
Expand Down Expand Up @@ -353,9 +345,15 @@
"uuid": "ba0c1e0b-0f00-416f-8097-a7dfc97871ff",
"description": "Can handle concurrent transactions",
"scenarios": ["concurrent"],
"comments": [
"This test is a good candidate to practice concurrency, which",
"may not be available or possible in the implementing language track.",
"Concurrency testing is often made by running the same operations in",
"parallel, and then checking that the final state is as expected."
],
"property": "bankAccount",
"input": {
"operations": [
"concurrent_operations": [
{
"operation": "deposit",
"value": 1
Expand Down