Example #1
0
 public void DeleteSystemFeedsTest()
 {
     PackageManager target = new PackageManager();
     IEnumerable<string> feedLocations = null; // TODO: Initialize to an appropriate value
     MessageHandlers messageHandlers = null; // TODO: Initialize to an appropriate value
     Task expected = null; // TODO: Initialize to an appropriate value
     Task actual;
     actual = target.DeleteSystemFeeds(feedLocations, messageHandlers);
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
Example #2
0
 public void AddSystemFeedsTest()
 {
     //column name in the data file
     string name = "AddSystemFeedsTest";
     //get the expected result from this data row for this test
     string testval = (string)Context.DataRow[name];
     int val;
     if (int.TryParse(testval, out val))
     {
         if (Test.CoApp.misc.Results.Ignore.Equals(val))
         {
             System.Console.Out.WriteLine("Skipping string " + (string) Context.DataRow["string"] + " for test " +
                                   name);
             return;
         }
     }
     PackageManager target = new PackageManager();
     IEnumerable<string> feedLocations = null; // TODO: Initialize to an appropriate value
     MessageHandlers messageHandlers = null; // TODO: Initialize to an appropriate value
     Task expected = null; // TODO: Initialize to an appropriate value
     Task actual = target.AddSystemFeeds(feedLocations, messageHandlers);
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
Example #3
0
 public void DoNotScanLocationsTest()
 {
     PackageManager target = new PackageManager();
     IEnumerable<string> expected = null; // TODO: Initialize to an appropriate value
     IEnumerable<string> actual;
     target.DoNotScanLocations = expected;
     actual = target.DoNotScanLocations;
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
Example #4
0
 public void SystemFeedLocationsTest()
 {
     PackageManager target = new PackageManager();
     IEnumerable<string> item = target.SystemFeedLocations;
     Assert.IsNotNull(item, "Object returned by SystemFeedLocations was null.");
 }
Example #5
0
 public void UpgradeTest()
 {
     PackageManager target = new PackageManager();
     IEnumerable<string> packageList = null; // TODO: Initialize to an appropriate value
     MessageHandlers messageHandlers = null; // TODO: Initialize to an appropriate value
     Task expected = null; // TODO: Initialize to an appropriate value
     Task actual;
     actual = target.Upgrade(packageList, messageHandlers);
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
Example #6
0
 public void PackageManagerConstructorTest()
 {
     PackageManager target = new PackageManager();
     Assert.IsNotNull(target, "Object returned by constructor was null.");
 }
Example #7
0
        public void SessionFeedLocationsTest()
        {
            PackageManager target = new PackageManager();
            System.Collections.ArrayList expected, actual;
            string[] var = {"c:\\"};
            expected = new System.Collections.ArrayList();
            IEnumerable<string> tmp = target.SessionFeedLocations;
            IEnumerator<string> stepper = tmp.GetEnumerator();
            stepper.MoveNext(); //init to first item
            while (stepper.Current != null)
            {
                expected.Add(stepper.Current);
                stepper.MoveNext();
            }
            expected.Add(var[0].ToLower());
            // The following line generates downstream tasks, and must be waited on to pass the test.
            target.SessionFeedLocations = var;

            // Adding this did not cause the test to run successfully.
            // Tasklet.WaitforCurrentChildTasks();

            actual = new System.Collections.ArrayList();
            tmp = target.SessionFeedLocations;
            stepper = tmp.GetEnumerator();
            stepper.MoveNext(); //init to first item
            while (stepper.Current != null)
            {
                actual.Add(stepper.Current);
                stepper.MoveNext();
            }
            Assert.IsNotNull(actual, "Received NULL session feed list after assignment.");

            foreach (object t in expected)
                if (!actual.Contains(t))
                {
                    string Estring = "";
                    for (int j = 0; j < expected.Count; j++)
                        Estring += (string)expected[j] + "\n";
                    string Astring = "";
                    for (int j = 0; j < actual.Count; j++)
                        Astring += (string)actual[j] + "\n";

                    Assert.Fail("Added feed location does not match expectation.\tMay be caused by incompleted child tasks.");
                }
            Assert.IsTrue(true, "Retrieved and altered Session feed locations successfully.");
        }
Example #8
0
 public void InstallPackagesTest()
 {
     PackageManager target = new PackageManager();
     IEnumerable<global::CoApp.Toolkit.Engine.Package> packages = null; // TODO: Initialize to an appropriate value
     MessageHandlers messageHandlers = null; // TODO: Initialize to an appropriate value
     Task expected = null; // TODO: Initialize to an appropriate value
     Task actual;
     actual = target.InstallPackages(packages, messageHandlers);
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
Example #9
0
 public void GetInstalledPackagesTest()
 {
     PackageManager target = new PackageManager();
     Assert.IsNotNull(target.GetInstalledPackages(), "Returned list of packages was null.");
     //Assert.Inconclusive("Verify the correctness of this test method.");
 }
Example #10
0
 public void GenerateAtomFeedTest()
 {
     PackageManager target = new PackageManager();
     string outputFilename = string.Empty; // TODO: Initialize to an appropriate value
     string packageSource = string.Empty; // TODO: Initialize to an appropriate value
     bool recursive = false; // TODO: Initialize to an appropriate value
     string rootUrl = string.Empty; // TODO: Initialize to an appropriate value
     string packageUrl = string.Empty; // TODO: Initialize to an appropriate value
     string actualUrl = string.Empty; // TODO: Initialize to an appropriate value
     string title = string.Empty; // TODO: Initialize to an appropriate value
     target.GenerateAtomFeed(outputFilename, packageSource, recursive, rootUrl, packageUrl, actualUrl, title);
     Assert.Inconclusive("A method that does not return a value cannot be verified.");
 }
Example #11
0
 public void FlushCacheTest()
 {
     PackageManager target = new PackageManager();
     target.FlushCache();
     Assert.Inconclusive("A method that does not return a value cannot be verified.");
 }
Example #12
0
        protected override void BeginProcessing()
        {
            BackRef = this;
            output = new List<object>();

            // Remoting...
            if (!ComputerName.IsNullOrEmpty())
            {
                Remotes = new List<Runspace>();
                Remote.ConnectionGenerator Gen = new Remote.ConnectionGenerator(UseSSL, Credential, Port);
                foreach (string comp in ComputerName)
                {
                    Remotes.Add(Gen.Generate(comp, Timeout, true));
                }
            }
            // Not remoting...
            else
            {
                PM = PackageManager.Instance;
                PM.ConnectAndWait("PSClient", SessionID, Timeout ?? 5000);
                messages = new PackageManagerMessages
                               {
                                   UnexpectedFailure = UnexpectedFailure,
                                   NoPackagesFound = NoPackagesFound,
                                   PermissionRequired = OperationRequiresPermission,
                                   Error = MessageArgumentError,
                                   RequireRemoteFile = GetRemoteFile,
                                   OperationCancelled = CancellationRequested,
                                   PackageInformation = PackageInfo,
                                   PackageDetails = PackageDetail,
                                   FeedDetails = FeedInfo,
                                   ScanningPackagesProgress = ScanProgress,
                                   InstallingPackageProgress = InstallProgress,
                                   RemovingPackageProgress = RemoveProgress,
                                   InstalledPackage = InstallComplete,
                                   RemovedPackage = RemoveComplete,
                                   FailedPackageInstall = InstallFailed,
                                   FailedPackageRemoval = RemoveFailed,
                                   Warning = WarningMsg,
                                   FeedAdded = NewFeed,
                                   FeedRemoved = LostFeed,
                                   FeedSuppressed = SupressedFeed,
                                   NoFeedsFound = NoFeeds,
                                   FileNotFound = NoFile,
                                   PackageBlocked = BlockedPackage,
                                   FileNotRecognized = NotRecognized,
                                   Recognized = Recognized,
                                   UnknownPackage = Unknown,
                                   PackageHasPotentialUpgrades = PotentialUpgrades,
                                   UnableToDownloadPackage = UnableToDownload,
                                   UnableToInstallPackage = UnableToInstall,
                                   UnableToResolveDependencies = UnableToResolveDeps,
                                   PackageSatisfiedBy = Satisfied
                               };
            }
        }