public void OnPackageOperationError_NoInvokeRequired_NonThreadSafeOnPackageOperationErrorMethodCalled()
        {
            CreateEvents();
            var expectedException = new Exception("test");

            threadSafeEvents.OnPackageOperationError(expectedException);

            Exception exception = fakeEvents.ExceptionPassedToOnPackageOperationError;

            Assert.AreEqual(expectedException, exception);
        }
        public void OnPackageOperationError_NoInvokeRequired_NonThreadSafeOnPackageOperationErrorMethodCalled()
        {
            CreateEvents();
            Exception exception = null;

            unsafeEvents.PackageOperationError += (sender, e) => exception = e.Exception;
            var expectedException = new Exception("test");

            threadSafeEvents.OnPackageOperationError(expectedException);

            Assert.AreEqual(expectedException, exception);
        }