-
Notifications
You must be signed in to change notification settings - Fork 0
/
WordSum.feature
42 lines (34 loc) · 1.54 KB
/
WordSum.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
33
34
35
36
37
38
39
40
Feature: Test wordSum functionality
As a user of String Magic
I want to be able to test a string
So that I can easily determine the sum of the value of its characters, ranging from A = 1 to Z = 26.
@WordSum
#This will test if the wordSum feature works for strings with values a - z (all lowercase)
Scenario: String has all valid lowercase characters
Given the user enters cat wordSum
When the user hits enter
Then the response is "You wrote a string with sum 24!";
@WordSum
#This will test if the wordSum feature works for strings with values A - Z (all uppercase)
Scenario: String has all valid uppercase characters
Given the user enters BAT wordSum
When the user hits enter
Then the response is "You wrote a string with sum 23!";
@WordSum
#This will test if the wordSum feature works for strings with values a - z and A - Z (mixed lowercase and uppercase)
Scenario: String has all valid uppercase characters
Given the user enters HaT wordSum
When the user hits enter
Then the response is "You wrote a string with sum 29!";
@wordSum
#This will test if the wordSum feature works for strings with integer values
Scenario: String has no valid characters
Given the user enters 1234 wordSum
When the user hits enter
Then the response is "You wrote a string that is not valid for this feature!"
@wordSum
#This will test if the wordSum feature works for strings with some valid characters
Scenario: String has same valid characters
Given the user enters bat1234 wordSum
When the user hits enter
Then the response is "You wrote a string that is not valid for this feature!"