Example #1
0
        public V1Component GetV1Component(VersionOneSettings settings)
        {
            if(component == null || DifferentSettingsRequired(settings))
            {
                component = new V1Component(settings);

                if(!component.ValidateConnection())
                {
                    logger.Info("Failed to validate VersionOne connection");
                    throw new InvalidOperationException("Failed to validate VersionOne connection");
                }

                logger.Info("Successfully connected to VersionOne.");
            }

            return component;
        }
        public V1Component GetV1Component(VersionOneSettings settings)
        {
            if (component == null || DifferentSettingsRequired(settings))
            {
                component = new V1Component(settings);

                if (!component.ValidateConnection())
                {
                    logger.Info("Failed to validate VersionOne connection");
                    throw new InvalidOperationException("Failed to validate VersionOne connection");
                }

                logger.Info("Successfully connected to VersionOne.");
            }

            return(component);
        }
Example #3
0
        private void btnTestV1Connection_Click(object sender, EventArgs e)
        {
            V1StatusLabel.ForeColor = Color.Black;

            V1StatusLabel.Text = "Connecting to " + V1URLTB.Text+ "...";
            V1StatusLabel.Refresh();

            try
            {
                Cursor.Current = Cursors.WaitCursor;

                var versionOneSettings = new VersionOneSettings()
                {
                    Path = V1URLTB.Text,
                    Username = V1UsernameTB.Text,
                    Password = V1PasswordTB.Text,
                    Integrated = UseIntegratedAuthenticationCB.Checked,
                    ProxySettings = GetProxySettings()
                };

                var v1Component = new V1Component(versionOneSettings);
                var connectionStatus = v1Component.ValidateConnection();
                DisplayConnectionValidationStatus(connectionStatus);
            }
            catch (Exception ex)
            {
                DisplayConnectionValidationStatus(false, ex.Message);
            }
            finally
            {
                Cursor.Current = Cursors.Default;
            }
        }
Example #4
0
        public void TestFixtureSetUp()
        {
            var settings = new VersionOneSettings {
                Path = "http://integsrv01/VersionOne12/",
                Username = "******",
                Password = "******",
                ProxySettings = null
            };

            component = new V1Component(settings);
            component.ValidateConnection();
        }