public void OnParentPackageInstalled_NoInvokeRequired_NonThreadSafeOnParentPackageInstalledMethodCalled()
        {
            CreateEvents();
            var expectedPackage = new FakePackage();

            threadSafeEvents.OnParentPackageInstalled(expectedPackage);

            IPackage package = fakeEvents.PackagePassedToOnParentPackageInstalled;

            Assert.AreEqual(expectedPackage, package);
        }
        public void OnParentPackageInstalled_NoInvokeRequired_NonThreadSafeOnParentPackageInstalledMethodCalled()
        {
            CreateEvents();
            IPackage package = null;
            IPackageManagementProject project = null;

            unsafeEvents.ParentPackageInstalled += (sender, e) => {
                package = e.Package;
                project = e.Project;
            };
            var expectedPackage = new FakePackage();
            var expectedProject = new FakePackageManagementProject();

            threadSafeEvents.OnParentPackageInstalled(expectedPackage, expectedProject);

            Assert.AreEqual(expectedPackage, package);
        }