public void AddPackage_RepositoryIsEmptyAndOnePackageAdded_RecentPackageAddedToOptions() { CreateRepository(); var package = AddOnePackageToRepository("Test"); var expectedPackages = new RecentPackageInfo[] { new RecentPackageInfo(package) }; RecentPackageInfoCollectionAssert.AreEqual(expectedPackages, recentPackages); }
public void AddPackage_RepositoryIsEmptyAndTwoPackagesAddedFromDifferentSources_BothRecentPackagesAddedToOptions() { CreateRepository(); var package1 = AddOnePackageToRepository("Test1"); var package2 = AddOnePackageToRepository("Test2"); var expectedPackages = new RecentPackageInfo[] { new RecentPackageInfo(package2), new RecentPackageInfo(package1) }; RecentPackageInfoCollectionAssert.AreEqual(expectedPackages, recentPackages); }
public void RecentPackages_OneRecentPackageAddedAndOptionsReloadedFromSavedProperties_ContainsOneRecentPackageThatWasSavedPreviously() { CreateOptions(); var package = new FakePackage("Test"); var recentPackage = new RecentPackageInfo(package); options.RecentPackages.Add(recentPackage); CreateOptions(properties); IList <RecentPackageInfo> recentPackages = options.RecentPackages; var expectedRecentPackages = new RecentPackageInfo[] { new RecentPackageInfo(package) }; RecentPackageInfoCollectionAssert.AreEqual(expectedRecentPackages, recentPackages); }