public void DataBind(BugzillaServiceEntity source) { AddControlBinding(txtCreateReassignValue, source, BugzillaServiceEntity.CreateReassignValueProperty); AddControlBinding(txtCloseReassignValue, source, BugzillaServiceEntity.CloseReassignValueProperty); AddHelpSupport(txtCreateReassignValue, source, BugzillaServiceEntity.CreateReassignValueProperty); AddHelpSupport(txtCloseReassignValue, source, BugzillaServiceEntity.CloseReassignValueProperty); }
public void VersionOneDependencyValidationFailureTest() { Expect.Call(FacadeMock.IsConnected).Return(false); MockRepository.ReplayAll(); BugzillaServiceEntity entity = new BugzillaServiceEntity(); validator.CheckVersionOneDependency(entity); MockRepository.VerifyAll(); }
public BugzillaConnectionValidator(BugzillaServiceEntity entity) { if(entity == null) { throw new ArgumentNullException(); } this.entity = entity; }
private static BugzillaServiceEntity CreateEntity() { BugzillaServiceEntity entity = new BugzillaServiceEntity(); entity.CloseAccept.BoolValue = true; entity.CloseFieldId = "close_field_id"; entity.CloseFieldValue = "close_field_value_1"; entity.CloseReassignValue = "close_reassign_value_1"; entity.CloseResolveValue = "close_resolve_value_1"; entity.CreateAccept.BoolValue = false; entity.CreateFieldId = "create_field_id_1"; entity.CreateFieldValue = "create_field_value_1"; entity.CreateReassignValue = "create_reassign_value_1"; entity.CreateResolveValue = "create_resolve_value_1"; entity.LinkField = "link_field"; entity.Password = "******"; entity.SearchName = "search_name"; entity.SourceName = "source_name"; entity.TagName = "tag_name"; entity.Url = "url"; entity.UrlTemplate = "url_template"; entity.UrlTitle = "url_title"; entity.UserName = "******"; entity.Timer = new TimerEntity(); entity.Timer.PublishClass = "VersionOne.ServiceHost.BugzillaServices.BugzillaHostedService+IntervalSync, VersionOne.ServiceHost.BugzillaServices"; return entity; }
public void SerializeTest() { const string urlValue = "http://versionone/"; const long timerValue = 12345; var bugzillaServiceConfigurationEntity = new BugzillaServiceEntity {Timer = {TimeoutMilliseconds = timerValue}, Url = urlValue}; serializer.Serialize(new BaseServiceEntity[] { bugzillaServiceConfigurationEntity }); serializer.SaveToFile("test.config"); var bugzillaUrlNodes = serializer.OutputDocument.SelectNodes(XmlEntitySerializer.RootNodeXPath + "/*[starts-with(@class,'" + ServicesMap.BugzillaService.FullTypeName + "')]/BugzillaUrl"); Assert.AreEqual(1, bugzillaUrlNodes.Count); Assert.AreEqual(urlValue, bugzillaUrlNodes[0].InnerText); var intervalNodes = serializer.OutputDocument.SelectNodes(XmlEntitySerializer.RootNodeXPath + "/*[starts-with(@class,'" + ServicesMap.TimerService.FullTypeName + "')]/PublishClass"); Assert.AreEqual(2, intervalNodes.Count); Assert.IsTrue(intervalNodes[0].InnerText.StartsWith("VersionOne.ServiceHost.CommonMode+FlushProfile")); Assert.IsTrue(intervalNodes[1].InnerText.StartsWith("VersionOne.ServiceHost.BugzillaServices.BugzillaHostedService+IntervalSync")); }