void RaisePackageRemovedEventWhenPackageReferenceAdded( FakeProjectManager projectManager, FakePackage newPackage, params PackageOperationEventArgs[] eventArgs) { projectManager.WhenAddPackageReferenceCalled( newPackage.Id, newPackage.Version, () => eventArgs.ToList().ForEach(eventArg => projectManager.FirePackageReferenceRemoved(eventArg))); }
public void PackageReferenceRemoved_ProjectManagerPackageReferenceRemovedEventFired_EventFiresWithPackage() { CreateProject(); PackageOperationEventArgs eventArgs = null; project.PackageReferenceRemoved += (sender, e) => eventArgs = e; var expectedPackage = new FakePackage(); fakeProjectManager.FirePackageReferenceRemoved(expectedPackage); Assert.AreEqual(expectedPackage, eventArgs.Package); }