public void ValuePopulation_EmptySet() { string configFile = "<issueUrlBuilder type=\"multiIssueTracker\"><issueTrackers/></issueUrlBuilder>"; MultiIssueTrackerUrlBuilder multiIssue = new MultiIssueTrackerUrlBuilder(); NetReflector.Read(configFile, multiIssue); }
public void ValuePopulation_BadEmptySet() { string configFile = "<issueUrlBuilder type=\"multiIssueTracker\"></issueUrlBuilder>"; MultiIssueTrackerUrlBuilder multiIssue = new MultiIssueTrackerUrlBuilder(); Assert.That(delegate { NetReflector.Read(configFile, multiIssue); }, Throws.TypeOf<NetReflectorException>().With.Message.EqualTo( "Missing Xml node (issueTrackers) for required member (ThoughtWorks.CruiseControl.Core.Sourcecontrol.MultiIssueTrackerUrlBuilder.IssueTrackers).\r\nXml: <issueUrlBuilder type=\"multiIssueTracker\"></issueUrlBuilder>")); }
public void ValuePopulation_RegExIssue() { string configFile = string.Format("<issueUrlBuilder type=\"multiIssueTracker\"><issueTrackers>{0}</issueTrackers></issueUrlBuilder>", regexIssueConfig); MultiIssueTrackerUrlBuilder multiIssue = new MultiIssueTrackerUrlBuilder(); NetReflector.Read(configFile, multiIssue); Assert.AreEqual(1, multiIssue.IssueTrackers.Length); Assert.IsInstanceOfType(typeof(RegExIssueTrackerUrlBuilder), multiIssue.IssueTrackers[0]); }
public void ValuePopulation_RegExIssue() { string configFile = string.Format(System.Globalization.CultureInfo.CurrentCulture,"<issueUrlBuilder type=\"multiIssueTracker\"><issueTrackers>{0}</issueTrackers></issueUrlBuilder>", regexIssueConfig); MultiIssueTrackerUrlBuilder multiIssue = new MultiIssueTrackerUrlBuilder(); NetReflector.Read(configFile, multiIssue); Assert.AreEqual(1, multiIssue.IssueTrackers.Length); Assert.That(multiIssue.IssueTrackers[0], Is.InstanceOf<RegExIssueTrackerUrlBuilder>()); }
public void ValuePopulation_DefaultIssue() { string configFile = string.Format(System.Globalization.CultureInfo.CurrentCulture,"<issueUrlBuilder type=\"multiIssueTracker\"><issueTrackers>{0}</issueTrackers></issueUrlBuilder>", defaultIssueConfig); MultiIssueTrackerUrlBuilder multiIssue = new MultiIssueTrackerUrlBuilder(); NetReflector.Read(configFile, multiIssue); Assert.AreEqual(1, multiIssue.IssueTrackers.Length); Assert.IsInstanceOfType(typeof(DefaultIssueTrackerUrlBuilder), multiIssue.IssueTrackers[0]); }