Пример #1
0
        public void TestValidatePanoramaSettings()
        {
            var logger = new TestLogger();
            var settings = new PanoramaSettings();

            var mainControl = new TestAppControl();
            mainControl.SetUIPanoramaSettings(settings);

            var panoramaSettingsTab = new PanoramaSettingsTab(mainControl, logger);

            Assert.IsTrue(panoramaSettingsTab.ValidateSettings());
            var log = logger.GetLog();
            Assert.IsTrue(log.Contains("Will NOT publish Skyline documents to Panorama."));

            settings.PublishToPanorama = true;
            logger.Clear();
            panoramaSettingsTab.Settings = settings;
            Assert.IsFalse(panoramaSettingsTab.ValidateSettings());
            log = logger.GetLog();
            Assert.IsTrue(log.Contains("Please specify a Panorama server URL."));
            Assert.IsTrue(log.Contains("Please specify a Panorama login name."));
            Assert.IsTrue(log.Contains("Please specify a Panorama user password."));
            Assert.IsTrue(log.Contains("Please specify a folder on the Panorama server."));
        }
Пример #2
0
 public PanoramaPinger(PanoramaSettingsTab panoramaSettingsTab, IAutoQCLogger logger)
 {
     _panoramaSettingsTab = panoramaSettingsTab;
     _logger = logger;
 }