public int DetectsModifiedPackages(string package1Final, string package2Final) { var initial = new[] {Tuple.Create("Package1", "1.0"), Tuple.Create("Package2", "1.0")}; var final = new[] {Tuple.Create("Package1", package1Final), Tuple.Create("Package2", package2Final)}; var compararator = new PackageChangeComparator(); var results = compararator.GetPackageChanges(CreateNuGetPackegList(initial), CreateNuGetPackegList(final)); return results.Count(r => r.Type == NuGetPackageChangeType.Modified); }
public int DetectsAddedRemovedPackages(int initialCount, int finalCount, NuGetPackageChangeType changeType) { var initial = Enumerable.Range(1,initialCount).Select(i => Tuple.Create("Package" +i.ToString(CultureInfo.InvariantCulture), "1.0")).ToList(); var final = Enumerable.Range(1,finalCount).Select(i => Tuple.Create("Package" + i.ToString(CultureInfo.InvariantCulture), "1.0")).ToList(); var compararator = new PackageChangeComparator(); var results = compararator.GetPackageChanges(CreateNuGetPackegList(initial), CreateNuGetPackegList(final)); return results.Count(r => r.Type == changeType); }