public void Initialize(XmlElement config, IEventManager eventManager, IProfile profile) { var bugzillaConfig = new BugzillaServiceConfiguration(); ConfigurationReader.ReadConfigurationValues(bugzillaConfig, config); ConfigurationReader.ProcessMappingSettings(bugzillaConfig.ProjectMappings, config[ProjectMappingsNode], BugzillaProjectNode, VersionOneProjectNode); ConfigurationReader.ProcessMappingSettings(bugzillaConfig.PriorityMappings, config[PriorityMappingsNode], BugzillaPriorityNode, VersionOnePriorityNode); sourceFieldValue = config["SourceFieldValue"].InnerText; this.eventManager = eventManager; logger = new Logger(eventManager); var bugzillaClientConfiguration = new BugzillaClientConfiguration { UserName = bugzillaConfig.UserName, Password = bugzillaConfig.Password, Url = bugzillaConfig.Url, IgnoreSSLCert = bugzillaConfig.IgnoreCert }; bugzillaClientFactory = new BugzillaClientFactory(bugzillaClientConfiguration, logger); var readerUpdater = new BugzillaReaderUpdater(bugzillaConfig, bugzillaClientFactory, logger); bugzillaReader = readerUpdater; bugzillaUpdater = readerUpdater; this.eventManager.Subscribe(typeof(IntervalSync), OnInterval); this.eventManager.Subscribe(typeof(WorkitemCreationResult), OnDefectCreated); this.eventManager.Subscribe(typeof(WorkitemStateChangeCollection), OnDefectStateChanged); }
public bool Validate() { System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12 | SecurityProtocolType.Ssl3; var bugzillaClientConfiguration = new BugzillaClientConfiguration { Password = entity.Password, UserName = entity.UserName, Url = entity.Url, IgnoreSSLCert = entity.IgnoreCertificate.BoolValue }; IBugzillaClient client = new BugzillaClient(bugzillaClientConfiguration); try { client.Login(); return(true); } catch (Exception) { return(false); } }
public void SetContext() { var liveInstanceOfBugzillaThatHasRestfulApi = "http://184.170.227.113/bugzilla/rest/"; IBugzillaClientConfiguration bugzillaClientConfiguration = new BugzillaClientConfiguration { UserName = "******", Password = "******", Url = liveInstanceOfBugzillaThatHasRestfulApi }; ILogger logger = MockRepository.GenerateMock<ILogger>(); _client = new BugzillaClient(bugzillaClientConfiguration, logger); _loggedInUserToken = _client.Login(); }
public void SetContext() { // This URL is what is setup if using the docker container var liveInstanceOfBugzillaThatHasRestfulApi = "http://localhost:8088/bugzilla/rest"; IBugzillaClientConfiguration bugzillaClientConfiguration = new BugzillaClientConfiguration { UserName = "******", Password = "******", Url = liveInstanceOfBugzillaThatHasRestfulApi }; ILogger logger = MockRepository.GenerateMock <ILogger>(); _client = new BugzillaClient(bugzillaClientConfiguration, logger); _loggedInUserToken = _client.Login(); }