public void GetSortedKeysTest(IEnumerable subject, string positionPropertyPath, object[] expected)
        {
            var sorter = new PositionalCollectionSorter(subject, positionPropertyPath);
            var result = sorter.GetSortedKeys();

            Assert.Equal(expected, result);
        }
        public void ReadmeTest()
        {
            var subject = new Dictionary <string, object> {
                { "key1", new { position = "start" } },
                { "key2", new { position = "before key1" } },
                { "key3", new { position = "after key2" } }
            };
            var sorter = new PositionalCollectionSorter(subject);

            Assert.Equal(new object[] { "key2", "key3", "key1" }, sorter.GetSortedKeys());
        }