예제 #1
0
        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);
        }
예제 #2
0
        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);
        }