public async Task WhenExistingBranchesAreFilteredOut() { var updateSets = new List <PackageUpdateSet> { PackageUpdates.UpdateFooFromOneVersion(), PackageUpdates.UpdateBarFromTwoVersions() }; var filter = BranchFilter(false); var target = SelectionForFilter(filter); var results = await target.SelectTargets(PushFork(), updateSets, NoFilter(), DefaultBranchSettings()); Assert.That(results.Count, Is.EqualTo(0)); }
public void WhenThereAreTwoInputs_MoreVersionsSecond_SecondIsTheTarget() { // sort should change this ordering var updateSets = new List <PackageUpdateSet> { PackageUpdates.UpdateFooFromOneVersion(), PackageUpdates.UpdateBarFromTwoVersions() }; var target = MakeSelection(); var results = target.SelectTargets(PushFork(), updateSets, NoFilter()); Assert.That(results.Count, Is.EqualTo(2)); Assert.That(results.First().SelectedId, Is.EqualTo("bar")); }
public async Task WhenThereAreTwoInputs_MoreVersionsSecond_SecondIsTheTarget() { // sort should change this ordering var updateSets = new List <PackageUpdateSet> { PackageUpdates.UpdateFooFromOneVersion(), PackageUpdates.UpdateBarFromTwoVersions() }; var target = SelectionForFilter(BranchFilter(true)); var results = await target.SelectTargets(PushFork(), updateSets, NoFilter(), DefaultBranchSettings()); Assert.That(results.Count, Is.EqualTo(2)); Assert.That(results.First().SelectedId, Is.EqualTo("bar")); }