RomanFigure comparisons

RomanFigure can be compared against other instances of RomanFigure using both IComparable<Romanfigure> and comparison operators:
Story is compare to roman figure
  In order to say that a figure is greater or lower than another figure
  As a library user
  I want compare a roman figure against another roman figure

      With scenario one figure is greater than another
        Given the romanfigure V
        When is compared to I
        Then is greater than zero

      With scenario one figure is less than another
        Given the romanfigure I
        When is compared to X
        Then is less than zero

      With scenario one figure is equal to another
        Given the romanfigure X
        When is compared to X
        Then is zero

      With scenario one figure is compared to NULL
        Given the romanfigure X
        When is compared to {NULL}
        Then is greater than zero

Story is greater than or equal to roman figure
  In order to say that a figure is greater than or equal to another figure
  As a library user
  I want apply a greater than or equal operator against another roman figure

      With scenario one figure is greater than another
        Given the romanfigure V
        When is greater than or equal I
        Then is True

      With scenario one figure is less than another
        Given the romanfigure I
        When is greater than or equal X
        Then is False

      With scenario one figure is equal to another
        Given the romanfigure X
        When is greater than or equal X
        Then is True

      With scenario one figure is compared to NULL
        Given the romanfigure N
        When is greater than or equal {NULL}
        Then is True

      With scenario NULL is compared to a figure
        Given the romanfigure {NULL}
        When is greater than or equal N
        Then is False

Story is greater than roman figure
  In order to say that a figure is greater than another figure
  As a library user
  I want apply a greater than operator against another roman figure

      With scenario one figure is greater than another
        Given the romanfigure V
        When is greater than I
        Then is True

      With scenario one figure is less than another
        Given the romanfigure I
        When is greater than X
        Then is False

      With scenario one figure is equal to another
        Given the romanfigure X
        When is greater than X
        Then is False

      With scenario one figure is compared to NULL
        Given the romanfigure N
        When is greater than {NULL}
        Then is True

      With scenario NULL is compared to a figure
        Given the romanfigure {NULL}
        When is greater than N
        Then is False

Story is less than or equal to roman figure
  In order to say that a figure is less than or equal to another figure
  As a library user
  I want apply a less than or equal operator against another roman figure

      With scenario one figure is greater than another
        Given the romanfigure V
        When is less than or equal I
        Then is False

      With scenario one figure is less than another
        Given the romanfigure I
        When is less than or equal X
        Then is True

      With scenario one figure is equal to another
        Given the romanfigure X
        When is less than or equal X
        Then is True

      With scenario one figure is compared to NULL
        Given the romanfigure N
        When is less than or equal {NULL}
        Then is False

      With scenario NULL is compared to a figure
        Given the romanfigure {NULL}
        When is less than or equal N
        Then is True

Story is less than roman figure
  In order to say that a figure is less than another figure
  As a library user
  I want apply a less than operator against another roman figure

      With scenario one figure is greater than another
        Given the romanfigure V
        When is less than I
        Then is False

      With scenario one figure is less than another
        Given the romanfigure I
        When is less than X
        Then is True

      With scenario one figure is equal to another
        Given the romanfigure X
        When is less than X
        Then is False

      With scenario one figure is compared to NULL
        Given the romanfigure N
        When is less than {NULL}
        Then is False

      With scenario NULL is compared to a figure
        Given the romanfigure {NULL}
        When is less than N
        Then is True


RomanFigure can be compared against other short numbers using both IComparable<short> and comparison operators:
Story is compare to number
  In order to say that a figure is greater or lower than a number
  As a library user
  I want compare a roman figure against a number

      With scenario one figure is greater than a number
        Given the romanfigure V
        When is compared to 1
        Then is greater than zero

      With scenario one figure is less than a number
        Given the romanfigure I
        When is compared to 10
        Then is less than zero

      With scenario one figure is equal to a number
        Given the romanfigure X
        When is compared to 10
        Then is zero

Story is greater than number
  In order to say that a figure is greater than a number
  As a library user
  I want apply a greater than operator against a  number

      With scenario one figure is greater than a number
        Given the romanfigure V
        When is greater than 1
        Then is True

      With scenario one figure is less than a number
        Given the romanfigure I
        When is greater than 10
        Then is False

      With scenario one figure is equal to a number
        Given the romanfigure X
        When is greater than 10
        Then is False

      With scenario NULL is compared to a number
        Given the romanfigure {NULL}
        When is greater than 0
        Then is False

Story is greater than or equal to roman figure
  In order to say that a figure is greater than or equal to another figure
  As a library user
  I want apply a greater than or equal operator against another roman figure

      With scenario one numer is greater than a figure
        Given the number 5
        When is greater than or equal I
        Then is True

      With scenario one number is less than a figure
        Given the number 1
        When is greater than or equal X
        Then is False

      With scenario one number is equal to a figure
        Given the number 10
        When is greater than or equal X
        Then is True

      With scenario one number is compared to NULL
        Given the number 0
        When is greater than or equal {NULL}
        Then is True

Story is greater than or equal to number
  In order to say that a figure is greater than or equal to a number
  As a library user
  I want apply a greater than or equal operator against a number

      With scenario one figure is greater than a number
        Given the romanfigure V
        When is greater than or equal 1
        Then is True

      With scenario one figure is less than a number
        Given the romanfigure I
        When is greater than or equal 10
        Then is False

      With scenario one figure is equal to a number
        Given the romanfigure X
        When is greater than or equal 10
        Then is True

      With scenario NULL is compared to a a number
        Given the romanfigure {NULL}
        When is greater than or equal 0
        Then is False

Story is greater than roman figure
  In order to say that a number is greater than a roman figure
  As a library user
  I want apply a greater than operator against a roman figure

      With scenario one number is greater than a figure
        Given the number 5
        When is greater than I
        Then is True

      With scenario one number is less than a figure
        Given the number 1
        When is greater than X
        Then is False

      With scenario one number is equal to a number
        Given the number 10
        When is greater than X
        Then is False

      With scenario one number is compared to NULL
        Given the number 0
        When is greater than {NULL}
        Then is True

Story is less than number
  In order to say that a figure is less than a number
  As a library user
  I want apply a less than operator against a number

      With scenario one figure is greater than a number
        Given the romanfigure V
        When is less than 1
        Then is False

      With scenario one figure is less than a number
        Given the romanfigure I
        When is less than 10
        Then is True

      With scenario one figure is equal to a number
        Given the romanfigure X
        When is less than 10
        Then is False

      With scenario NULL is compared to a number
        Given the romanfigure {NULL}
        When is less than 0
        Then is True

Story is less than or equal to number
  In order to say that a figure is less than or equal to a number
  As a library user
  I want apply a less than or equal operator against a number

      With scenario one figure is greater than a number
        Given the romanfigure V
        When is less than or equal 1
        Then is False

      With scenario one figure is less than a number
        Given the romanfigure I
        When is less than or equal 10
        Then is True

      With scenario one figure is equal to a number
        Given the romanfigure X
        When is less than or equal 10
        Then is True

      With scenario NULL is compared to a figure
        Given the romanfigure {NULL}
        When is less than or equal 0
        Then is True

Story is less than or equal to roman figure
  In order to say that a number is less than or equal to a roman figure
  As a library user
  I want apply a less than or equal operator against a roman figure

      With scenario one number is greater than a figure
        Given the number 5
        When is less than or equal I
        Then is False

      With scenario one number is less than a figure
        Given the number 1
        When is less than or equal X
        Then is True

      With scenario one number is equal to a figure
        Given the number 10
        When is less than or equal X
        Then is True

      With scenario one number is compared to NULL
        Given the number 0
        When is less than or equal {NULL}
        Then is False

Story is less than roman figure
  In order to say that a number is less than a number
  As a library user
  I want apply a less than operator against a roman figure

      With scenario one number is greater than a figure
        Given the number 5
        When is less than I
        Then is False

      With scenario one number is less than a number
        Given the number 1
        When is less than X
        Then is True

      With scenario one number is equal to a number
        Given the number 10
        When is less than X
        Then is False

      With scenario one number is compared to NULL
        Given the number 0
        When is less than {NULL}
        Then is False

Last edited Jan 3, 2012 at 10:21 PM by dgon, version 1

Comments

No comments yet.