CodePlexProject Hosting for Open Source Software

Story is equatable to roman figure In order to say that a figure is equal to another figure As a library user I want to use IEquatable<RomanFigure> methods against a roman figure With scenario a roman figure is compared against the same roman figure Given the roman figure V When compared to V Then is True With scenario a roman figure is compared against not the same roman figure Given the roman figure V When compared to X Then is False With scenario a roman figure is compared against null Given the roman figure V When compared to {NULL} Then is False

It also implements IEquatable<short>:

Story is equatable to a number In order to say that a figure is equal to a number As a library user I want to use IEquatable<short> methods against a roman figure With scenario a roman figure is compared against a number with the same value Given the roman figure V When compared to 5 Then is True With scenario a roman figure is compared against a number with a different value Given the roman figure V When compared to 10 Then is False

And IEquatable<char>:

Story is equatable to a char In order to say that a figure is equal to a char As a library user I want to use IEquatable<char> methods against a roman figure With scenario a roman figure is compared against a char with the same value Given the roman figure V When compared to V Then is True With scenario a roman figure is compared against a char with a different value Given the roman figure V When compared to X Then is False With scenario a roman figure is compared against a char with the same value and different case Given the roman figure V When compared to v Then is False

And it also overrides the non-generic .Equals() method:

Story is non generic equatable In order to say that an object is equal to a roman figure As a library user I want to use .Equals() against an object With scenario a roman figure is compared against a boxed char with the same value Given the roman figure V When compared to V Then is True With scenario a roman figure is compared against a boxed char with a different value Given the roman figure V When compared to X Then is False With scenario a roman figure is compared against a boxed short with the same value Given the roman figure V When compared to 5 Then is True With scenario a roman figure is compared against a boxed short with a different value Given the roman figure V When compared to 10 Then is False With scenario a roman figure is compared against the same objectified figure Given the roman figure V When compared to V Then is True With scenario a roman figure is compared against another objectified figure Given the roman figure V When compared to X Then is False With scenario a roman figure is compared against null Given the roman figure V When compared to {NULL} Then is False With scenario a roman figure is compared against a boxed lowercase char with the same value Given the roman figure V When compared to v Then is False With scenario a roman figure is compared against a boxed int with the same value Given the roman figure V When compared to 5 Then is False

Last edited Jan 3, 2012 at 8:53 PM by dgon, version 1