Inheritance: IVsSortDescriptor
        public void LoadPageFollowedBySortClearsCacheAndUsesNewSortOrder()
        {
            // Arrange
            var idSortDescriptor = new PackageSortDescriptor("Id", "Id", ListSortDirection.Ascending);
            PackagesTreeNodeBase node = CreatePackagesTreeNodeBase(numberOfPackages: 5);
            node.IsSelected = true;

            // Act            
            TreeNodeActionTest(node,
                               n => n.LoadPage(1),
                               n =>
                               {
                                   // Assert
                                   Assert.Equal(1, n.TotalPages);
                                   Assert.Equal(1, n.CurrentPage);
                                   Assert.Equal(5, n.Extensions.Count);
                                   Assert.Equal("A4", n.Extensions[0].Name);
                                   Assert.Equal("A3", n.Extensions[1].Name);
                                   Assert.Equal("A2", n.Extensions[2].Name);
                                   Assert.Equal("A1", n.Extensions[3].Name);
                                   Assert.Equal("A0", n.Extensions[4].Name);
                               });

            TreeNodeActionTest(node,
                               n => n.SortSelectionChanged(idSortDescriptor),
                               n =>
                               {
                                   // Assert
                                   Assert.Equal(1, n.TotalPages);
                                   Assert.Equal(1, n.CurrentPage);
                                   Assert.Equal(5, n.Extensions.Count);
                                   Assert.Equal("A0", n.Extensions[0].Name);
                                   Assert.Equal("A1", n.Extensions[1].Name);
                                   Assert.Equal("A2", n.Extensions[2].Name);
                                   Assert.Equal("A3", n.Extensions[3].Name);
                                   Assert.Equal("A4", n.Extensions[4].Name);
                               });
        }
        public void LoadPageMethodWithCustomSortLoadsExtensionsInTheCorrectOrder()
        {
            // Arrange
            var idSortDescriptor = new PackageSortDescriptor("Id", "Id", ListSortDirection.Descending);

            TreeNodeActionTest(node => node.SortSelectionChanged(idSortDescriptor),
                               node =>
                               {
                                   // Assert
                                   Assert.Equal(1, node.TotalPages);
                                   Assert.Equal(1, node.CurrentPage);
                                   Assert.Equal(5, node.Extensions.Count);

                                   Assert.Equal("A4", node.Extensions[0].Name);
                                   Assert.Equal("A3", node.Extensions[1].Name);
                                   Assert.Equal("A2", node.Extensions[2].Name);
                                   Assert.Equal("A1", node.Extensions[3].Name);
                                   Assert.Equal("A0", node.Extensions[4].Name);

                                   Assert.Equal(5, node.TotalNumberOfPackages);
                               },
                               numberOfPackages: 5);
        }