Skip to content

RomanNumeral.Spec.Arithmetic

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

Story: try parse a string

As a library user
I want use methods and operands on roman numeral instances
So that I can perform simple arithmetic operations

adding not NULL to NULL

Given the roman numeral 'null'
When added V
Then the result is V

Tags: RomanNumeral, Arithmetic, Addition, add figure

adding not NULL to NULL

Given the roman numeral 'null'
When added XIII
Then the result is the same as 'null'

Tags: RomanNumeral, Arithmetic, Addition, add figure

adding NULL

Given the roman numeral XIII
When plus 'null'
Then the result is the same as XIII

Tags: RomanNumeral, Arithmetic, Addition, add figure

adding NULL

Given the roman numeral XIII
When plus 'null'
Then the result is the same as XIII

Tags: RomanNumeral, Arithmetic, Addition, add figure

adding NULL to not NULL

Given the roman numeral XIII
When added 'null'
Then the result is the same as 'null'

Tags: RomanNumeral, Arithmetic, Addition, add figure

adding NULL to not NULL

Given the roman numeral XIII
When added 'null'
Then the result is the same as 'null'

Tags: RomanNumeral, Arithmetic, Addition, add figure

adding NULL to NULL

Given the roman numeral 'null'
When added 'null'
Then the result is 'null'

Tags: RomanNumeral, Arithmetic, Addition, add figure

adding NULL to NULL

Given the roman numeral 'null'
When added 'null'
Then the result is 'null'

Tags: RomanNumeral, Arithmetic, Addition, add figure

bounded operation

Given the roman numeral XX
When added V
Then the result is XXV
And is not destructive

Tags: RomanNumeral, Arithmetic, Addition, add figure

bounded operation

Given the roman numeral XX
When added XI
Then the result is XXXI
And is not destructive

Tags: RomanNumeral, Arithmetic, Addition, add figure

bounded operation

Given the roman numeral XX
When substracted XI
Then the result is IX
And is not destructive

Tags: RomanNumeral, Arithmetic, Addition, add figure

bounded operation

Given the roman numeral XX
When substracted V
Then the result is XV
And is not destructive

Tags: RomanNumeral, Arithmetic, Addition, add figure

bounded operation

Given the roman numeral XX
When plus XI
Then the result is XXXI
And is not destructive

Tags: RomanNumeral, Arithmetic, Addition, add figure

bounded operation

Given the roman numeral XX
When minus V
Then the result is XV
And is not destructive

Tags: RomanNumeral, Arithmetic, Addition, add figure

bounded operation

Given the roman numeral XX
When plus V
Then the result is XXV
And is not destructive

Tags: RomanNumeral, Arithmetic, Addition, add figure

bounded operation

Given the roman numeral XX
When minus XI
Then the result is IX
And is not destructive

Tags: RomanNumeral, Arithmetic, Addition, add figure

overflowing operation

Given the roman numeral MMMCMXCIX
When added I
Then the result overflows

Tags: RomanNumeral, Arithmetic, Addition, add figure

overflowing operation

Given the roman numeral MMMCMXCIX
When added I
Then the result overflows

Tags: RomanNumeral, Arithmetic, Addition, add figure

overflowing operation

Given the roman numeral N
When substracted I
Then the result overflows

Tags: RomanNumeral, Arithmetic, Addition, add figure

overflowing operation

Given the roman numeral N
When substracted I
Then the result overflows

Tags: RomanNumeral, Arithmetic, Addition, add figure

overflowing operation

Given the roman numeral MMMCMXCIX
When plus I
Then the result overflows

Tags: RomanNumeral, Arithmetic, Addition, add figure

overflowing operation

Given the roman numeral N
When minus I
Then the result overflows

Tags: RomanNumeral, Arithmetic, Addition, add figure

overflowing operation

Given the roman numeral MMMCMXCIX
When plus I
Then the result overflows

Tags: RomanNumeral, Arithmetic, Addition, add figure

overflowing operation

Given the roman numeral N
When minus I
Then the result overflows

Tags: RomanNumeral, Arithmetic, Addition, add figure

substracting not NULL to NULL

Given the roman numeral 'null'
When substracted XIII
Then the result is the same as 'null'

Tags: RomanNumeral, Arithmetic, Addition, add figure

substracting not NULL to NULL

Given the roman numeral 'null'
When substracted V
Then the result is V

Tags: RomanNumeral, Arithmetic, Addition, add figure

substracting NULL

Given the roman numeral XIII
When minus 'null'
Then the result is the same as XIII

Tags: RomanNumeral, Arithmetic, Addition, add figure

substracting NULL

Given the roman numeral XIII
When minus 'null'
Then the result is the same as XIII

Tags: RomanNumeral, Arithmetic, Addition, add figure

substracting NULL from not NULL

Given the roman numeral XIII
When substracted 'null'
Then the result is the same as 'null'

Tags: RomanNumeral, Arithmetic, Addition, add figure

substracting NULL to not NULL

Given the roman numeral XIII
When substracted 'null'
Then the result is the same as 'null'

Tags: RomanNumeral, Arithmetic, Addition, add figure

substracting NULL to NULL

Given the roman numeral 'null'
When substracted 'null'
Then the result is 'null'

Tags: RomanNumeral, Arithmetic, Addition, add figure

substracting NULL to NULL

Given the roman numeral 'null'
When substracted 'null'
Then the result is 'null'

Tags: RomanNumeral, Arithmetic, Addition, add figure

Clone this wiki locally