Beispiel #1
0
        public void TestAlertWithHostsAndNoConnection()
        {
            XenServerPatch      p     = new XenServerPatch("uuid", "name", "My description", "guidance", string.Empty, "6.0.1", "http://url", "http://patchUrl", new DateTime(2011, 4, 1).ToString(), "1", "", "");
            XenServerPatchAlert alert = new XenServerPatchAlert(p);

            alert.IncludeHosts(new List <Host>()
            {
                hostA.Object, hostB.Object
            });

            ClassVerifiers.VerifyGetters(alert, new AlertClassUnitTestData
            {
                AppliesTo    = "HostAName, HostBName",
                FixLinkText  = "Go to Web Page",
                HelpID       = "XenServerPatchAlert",
                Description  = "My description",
                HelpLinkText = "Help",
                Title        = "New Update Available - name",
                Priority     = "Priority1"
            });

            Assert.IsFalse(alert.CanIgnore);

            VerifyConnExpectations(Times.Never);
            VerifyHostsExpectations(Times.Once);
        }
        public void TestAlertWithHostsAndNoConnection()
        {
            XenServerVersion ver = new XenServerVersion("1.2.3", "name", true, false, "http://url", new List <XenServerPatch>(), new List <XenServerPatch>(), new DateTime(2011, 4, 1).ToString(), "123", "", false, "", "", "", "", "");
            var alert            = new XenServerVersionAlert(ver);

            alert.IncludeHosts(new List <Host> {
                hostA.Object, hostB.Object
            });

            ClassVerifiers.VerifyGetters(alert, new AlertClassUnitTestData
            {
                AppliesTo    = "HostAName, HostBName",
                FixLinkText  = "Go to Web Page",
                HelpID       = "XenServerUpdateAlert",
                Description  = "name is now available. Download the latest at the " + BrandManager.COMPANY_NAME_SHORT + " website.",
                HelpLinkText = "Help",
                Title        = "name is now available",
                Priority     = "Priority5"
            });

            Assert.IsFalse(alert.CanIgnore);

            VerifyConnExpectations(Times.Never);
            VerifyHostsExpectations(Times.Once);
        }
 public void VerifyStoredDataWithDefaultConstructor()
 {
     ClassVerifiers.VerifyGetters(new DuplicateIqnAlert(new Host(), new Dictionary <Host, Host>()),
                                  new ClassData
     {
         FixLinkText  = "Edit IQN",
         HelpID       = "DuplicateIqnAlert",
         HelpLinkText = "Help",
         Title        = "iSCSI-IQN Exists",
         Priority     = "Priority3"
     });
 }
Beispiel #4
0
 public void VerifyStoredDataWithDefaultConstructor()
 {
     ClassVerifiers.VerifyGetters(new GuiOldAlert(),
                                  new AlertClassUnitTestData
     {
         AppliesTo    = XenAdmin.Branding.BRAND_CONSOLE,
         Description  = "There is a newer version of " + XenAdmin.Branding.BRAND_CONSOLE + " available. Please contact your support representative.",
         FixLinkText  = "Go to Web Page",
         HelpID       = "GuiOldAlert",
         HelpLinkText = "Help",
         Title        = "Newer " + XenAdmin.Branding.BRAND_CONSOLE + " Available",
         Priority     = "Priority5"
     });
 }
Beispiel #5
0
 public void VerifyStoredDataWithDefaultConstructor()
 {
     ClassVerifiers.VerifyGetters(new MissingIqnAlert(new Host()),
                                  new AlertClassUnitTestData
     {
         AppliesTo    = "",
         FixLinkText  = "Edit IQN",
         HelpID       = "MissingIqnAlert",
         Description  = " has no iSCSI-IQN. This could cause problems with iSCSI storage on this network.",
         HelpLinkText = "Help",
         Title        = "iSCSI-IQN Missing",
         Priority     = "Priority3"
     });
 }
        public void VerifyStoredDataWithDefaultConstructor()
        {
            var version = new XenCenterVersion("6.0.2", "xc", true, false, "http://url",
                                               new DateTime(2011, 12, 09).ToString());

            ClassVerifiers.VerifyGetters(new XenCenterUpdateAlert(version),
                                         new AlertClassUnitTestData
            {
                AppliesTo   = XenAdmin.Branding.BRAND_CONSOLE,
                FixLinkText = "Go to Web Page",
                HelpID      = "XenCenterUpdateAlert",
                Description = "xc is now available. Download the new version from the "
                              + XenAdmin.Branding.COMPANY_NAME_SHORT + " website.",
                HelpLinkText = "Help",
                Title        = "xc is now available",
                Priority     = "Priority5"
            });
        }