public void With_Existing_Flips_Property() { var value = $"{nameof(Thing.Id)}"; var sort = new SortCollection <Thing>(value); var actual = sort.AddOrUpdate("Id"); output.WriteLine(actual); Assert.Equal("-Id", actual); }
public void With_NotExisting_Appends_Property() { var value = $"{nameof(Thing.Id)}"; var sort = new SortCollection <Thing>(value); var actual = sort.AddOrUpdate("CreatedAt"); output.WriteLine(actual); Assert.Equal("Id,CreatedAt", actual); }