Skip to content

RomanFigure.Spec.TryParse

Daniel Gonzalez Garcia edited this page May 5, 2017 · 2 revisions

Story: try parse

As a library user
I want to be able to try to parse text
So that I can get a figure instance

figures are unique

Given the string X
When the string is parsed
the string X is parsed again
Then is the same figure

Tags: RomanFigure, TryParse, string

figures are unique

Given the character X
When the char is parsed
the char X is parsed again
Then is the same figure

Tags: RomanFigure, TryParse, string

parse a defined figure

Given the string I
When the string is parsed
Then the result is True
And the figure is I

Tags: RomanFigure, TryParse, string

parse a defined figure

Given the character I
When the char is parsed
Then the result is True
And the figure is I

Tags: RomanFigure, TryParse, string

parse an undefined figure

Given the string W
When the string is parsed
Then the result is False
And the figure is 'null'

Tags: RomanFigure, TryParse, string

parse an undefined figure

Given the character W
When the char is parsed
Then the result is False
And the figure is 'null'

Tags: RomanFigure, TryParse, string

Clone this wiki locally