示例#1
0
        public void Execute_InstallHasPackageOperations_PackageInstallNotificationRaisedWithPackageOperations()
        {
            CreateAction();
            installPackageHelper.AddPackageInstallOperation();
            IEnumerable <PackageOperation> actualOperations = null;

            packageManagementEvents.ParentPackageInstalled += (sender, e) => actualOperations = e.Operations;

            installPackageHelper.InstallTestPackage();

            CollectionAssert.AreEqual(action.Operations, actualOperations);
        }
        public void InstallPackage_OnePackageOperation_PackageOperationPassedToPackageManagerWhenInstallingPackage()
        {
            CreatePackageManagementService();

            installPackageHelper.AddPackageInstallOperation();
            installPackageHelper.InstallTestPackage();

            var actualOperations =
                fakePackageManagerFactory
                .FakePackageManager
                .ParametersPassedToInstallPackage
                .PackageOperationsPassedToInstallPackage;

            CollectionAssert.AreEqual(installPackageHelper.PackageOperations, actualOperations);
        }