Example #1
0
        public void Execute_ActionHasOnePackage_ParentPackagesUpdatedEventIsFired()
        {
            CreateAction();
            AddPackageToAction("Test", "1.0");

            action.Execute();

            packageEvents.AssertWasCalled(events => events.OnParentPackagesUpdated(action.Packages));
        }
        public void Execute_OneProjectThatHasOlderVersionOfPackageBeingUpdated_PackagesUpdatedEventIsFired()
        {
            PackageOperation operation = CreateInstallOperationWithFile(@"tools\readme.txt");

            CreateActionWithOperations(operation);
            IPackageFromRepository    package = AddPackageToAction("Test", "1.0");
            IPackageManagementProject project = AddProjectToSolution();
            var expectedOperations            = new PackageOperation[] { operation };

            action.Execute();

            packageEvents.AssertWasCalled(events => events.OnParentPackagesUpdated(action.Packages));
        }
 void AssertOnPackageOperationMessageLoggedCalled(MessageLevel level, string message)
 {
     fakePackageManagementEvents.AssertWasCalled(
         events => events.OnPackageOperationMessageLogged(level, message));
 }