-
Notifications
You must be signed in to change notification settings - Fork 0
/
Malformed Inputs.feature
33 lines (25 loc) · 1.28 KB
/
Malformed Inputs.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Feature: Malformed Inputs
https://osherove.com/tdd-kata-1
A bonus not in the original Kata, with expected exception messages and seemingly malformed
inputs which are acceptable
Background:
Given a calculator
Scenario Outline: Malformed inputs throw exceptions
When the input is "<string>"
Then there is an exception "<message>"
Examples:
| string | message |
| 1@2 | Unexpected delimiter found |
| 1@ | Unexpected delimiter found |
| @1 | Invalid characters where number expected |
| 1,, | Multiple delimiters encountered |
| //;1;2 | Missing newline after delimiters |
| //[**\n1*2 | Missing closing bracket on multibyte delimiter |
| //[**]1*2 | Missing newline after delimiters |
| //[**]\n1*2 | Unexpected delimiter found |
Scenario Outline: Malformed inputs that are considered good
When the input is "<string>"
Then the result is <result>
Examples:
| string | result |
| //**]\n1*2 | 3 |