private void PopulateFile(ReportFile file, Namespace ns, Coverage coverage) { foreach(CoveragePoint point in coverage.CoveragePoints) { if(point.Namespace == ns.Name && point.Filename == file.Filename) { file.Points.Add(point); } } }
/// <summary> /// Determines whether [contains] [the specified reportnamespace]. /// </summary> /// <param name="reportnamespace">The reportnamespace.</param> /// <returns> /// <c>true</c> if [contains] [the specified reportnamespace]; otherwise, <c>false</c>. /// </returns> public bool Contains(Namespace reportnamespace) { foreach(Namespace ns in base.InnerList) { if(ns == reportnamespace) return true; } return false; }
public void Insert() { this.namespaces.Add(this.ns); this.namespaces.Add(this.ns); this.namespaces.Add(this.ns); this.namespaces.Add(this.ns); Namespace ns1 = new Namespace(); this.namespaces.Insert(2, ns1); Assert.AreEqual(ns1, this.namespaces[2]); }
private void PopulateNamespace(Namespace ns, Coverage coverage) { foreach(CoveragePoint point in coverage.CoveragePoints) { if(point.Namespace == ns.Name) { if(!ns.Files.Contains(point.Filename)) { ReportFile file = new ReportFile() { Filename = point.Filename }; ns.Files.Add(file); PopulateFile(file, ns, coverage); } } } }
public void SetUp() { this.ns = new Namespace(); }
/// <summary> /// Adds the specified reportnamespace. /// </summary> /// <param name="reportnamespace">The reportnamespace.</param> /// <returns></returns> public int Add(Namespace reportnamespace) { return base.InnerList.Add(reportnamespace); }
/// <summary> /// Removes the specified reportnamespace. /// </summary> /// <param name="reportnamespace">The reportnamespace.</param> public void Remove(Namespace reportnamespace) { base.InnerList.Remove(reportnamespace); }
/// <summary> /// Inserts the specified index. /// </summary> /// <param name="index">The index.</param> /// <param name="reportnamespace">The reportnamespace.</param> public void Insert(int index, Namespace reportnamespace) { base.InnerList.Insert(index, reportnamespace); }
public void Setup() { this.namespaces = new NamespaceCollection(); this.ns = new Namespace(); }