示例#1
0
		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);
				}
			}
		}
示例#2
0
        /// <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]);
		}
示例#4
0
		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);
					}
				}
			}
		}
示例#5
0
		public void SetUp()
		{
			this.ns = new Namespace();
		}
示例#6
0
        /// <summary>
        /// Adds the specified reportnamespace.
        /// </summary>
        /// <param name="reportnamespace">The reportnamespace.</param>
        /// <returns></returns>
		public int Add(Namespace reportnamespace)
		{
			return base.InnerList.Add(reportnamespace);
		}
示例#7
0
        /// <summary>
        /// Removes the specified reportnamespace.
        /// </summary>
        /// <param name="reportnamespace">The reportnamespace.</param>
		public void Remove(Namespace reportnamespace)
		{
			base.InnerList.Remove(reportnamespace);
		}
示例#8
0
        /// <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();
		}