Created
August 15, 2012 03:33
-
-
Save coreyhaines/3355480 to your computer and use it in GitHub Desktop.
Number 2 LED
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Create a system that will convert a numeric value to an 3x5 LED display. | |
... | |
... | |
... | |
... | |
... | |
Feature: Generating LCD representation for single numbers | |
Scenario: Number 1 | |
When I convert the number "1" to LCD | |
Then I should get the following representation | |
""" | |
| | |
| | |
""" | |
Scenario: Number 2 | |
When I convert the number "2" to LCD | |
Then I should get the following representation | |
""" | |
- | |
| | |
- | |
| | |
- | |
""" | |
Scenario: Number 3 | |
When I convert the number "3" to LCD | |
Then I should get the following representation | |
""" | |
- | |
| | |
- | |
| | |
- | |
""" | |
Scenario: Number 4 | |
When I convert the number "4" to LCD | |
Then I should get the following representation | |
""" | |
| | | |
- | |
| | |
""" | |
Scenario: Number 5 | |
When I convert the number "5" to LCD | |
Then I should get the following representation | |
""" | |
- | |
| | |
- | |
| | |
- | |
""" | |
Scenario: Number 6 | |
When I convert the number "6" to LCD | |
Then I should get the following representation | |
""" | |
- | |
| | |
- | |
| | | |
- | |
""" | |
Scenario: Number 7 | |
When I convert the number "7" to LCD | |
Then I should get the following representation | |
""" | |
- | |
| | |
| | |
""" | |
Scenario: Number 8 | |
When I convert the number "8" to LCD | |
Then I should get the following representation | |
""" | |
- | |
| | | |
- | |
| | | |
- | |
""" | |
Scenario: Number 9 | |
When I convert the number "9" to LCD | |
Then I should get the following representation | |
""" | |
- | |
| | | |
- | |
| | |
- | |
""" | |
Scenario: Number 0 | |
When I convert the number "0" to LCD | |
Then I should get the following representation | |
""" | |
- | |
| | | |
| | | |
- | |
""" | |
Step 2 | |
Support multiple digits with a column of spaces in-between | |
Feature: Generating LCD representation for multi-digit numbers | |
Scenario: 12 | |
When I convert the number "12" to LCD | |
Then I should get the following representation | |
""" | |
- | |
| | | |
- | |
| | | |
- | |
""" | |
Scenario: 345 | |
When I convert the number "345" to LCD | |
Then I should get the following representation | |
""" | |
- - | |
| | | | | |
- - - | |
| | | | |
- - | |
""" | |
Scenario: 67890 | |
When I convert the number "67890" to LCD | |
Then I should get the following representation | |
""" | |
- - - - - | |
| | | | | | | | | |
- - - | |
| | | | | | | | | |
- - - - | |
""" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment