OpenRealEstate / OpenRealEstate.NET

OBSOLETE REPO - PLEASE DO NOT USE. Use https://github.com/OpenRealEstate instead
MIT License
10 stars 10 forks source link

Sort media by default semantics. #28

Closed ctolkien closed 6 years ago

ctolkien commented 7 years ago
PureKrome commented 7 years ago

Also, change the test from a [Fact] to:

[Theory]
[MemberData(nameof(ValidData))]
public void GivenACollectionOfMedias_CompareTo_CorrectlySortsTheCollection(Media[] medias)
{

and make ValidData something like...

public static IEnumerable<object[]> ValidData => new[]
{
    new object[]
    {
        // Collection sorted.
    },
    new object[]
    {
        // Collection but unsorted.
    }
};

Also, need some tests for an empty collection (is that considered a valid test?)

also tests for comparing things that are not the same. This checks for the ArgumentException.

eg. Order vs a Cow or whatever.

ctolkien commented 7 years ago

Also, need some tests for an empty collection (is that considered a valid test?)

How would we test that? That it doesn't throw?

PureKrome commented 7 years ago

How would we test that? That it doesn't throw?

Because that's a valid scenario and whatever the correct solution is (under that scenario), needs to be 1) considered 2) tested.

PureKrome commented 6 years ago

Manually ended up adding in these changes (or similar) to #42 .