Add assertions to actually check order

This commit is contained in:
Bartłomiej Dach 2021-02-27 14:57:37 +01:00
parent 528de5869e
commit dd2f63f313
1 changed files with 4 additions and 0 deletions

View File

@ -19,6 +19,10 @@ public void TestOrdering()
var orderedSettings = objectWithSettings.GetOrderedSettingsSourceProperties().ToArray();
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