mirror of https://github.com/ppy/osu
Add assertions to actually check order
This commit is contained in:
parent
528de5869e
commit
dd2f63f313
|
@ -19,6 +19,10 @@ public void TestOrdering()
|
||||||
var orderedSettings = objectWithSettings.GetOrderedSettingsSourceProperties().ToArray();
|
var orderedSettings = objectWithSettings.GetOrderedSettingsSourceProperties().ToArray();
|
||||||
|
|
||||||
Assert.That(orderedSettings, Has.Length.EqualTo(3));
|
Assert.That(orderedSettings, Has.Length.EqualTo(3));
|
||||||
|
|
||||||
|
Assert.That(orderedSettings[0].Item2.Name, Is.EqualTo(nameof(ClassWithSettings.FirstSetting)));
|
||||||
|
Assert.That(orderedSettings[1].Item2.Name, Is.EqualTo(nameof(ClassWithSettings.SecondSetting)));
|
||||||
|
Assert.That(orderedSettings[2].Item2.Name, Is.EqualTo(nameof(ClassWithSettings.ThirdSetting)));
|
||||||
}
|
}
|
||||||
|
|
||||||
private class ClassWithSettings
|
private class ClassWithSettings
|
||||||
|
|
Loading…
Reference in New Issue