I have a custom collection type of data. This data is sorted by three properties in their order, e.g. take the following example:
class Data
{
public int PropertyA() { get; set; }
public int PropertyB() { get; set; }
public int PropertyC() { get; set; }
}
The collection must maintain the order of A, B, C, e.g.:
[A, B, C]
[1, 2, 5]
[1, 3, 3]
[1, 3, 4]
[1, 4, 1]
[2, 1, 2]
[3, 3, 1]
[3, 4, 2]
I'd like to write some tests to ensure that this order is maintained in the collection through the usual suspect Add and Remove operations. I'm using Gallio and MbUnit 3, and I think there must be an easy way to do this with their attributes, I just don't get it right now. Any ideas?