Пример #1
0
		public void TestConstructor()
		{
			this.point = new CoveragePoint("foo.txt", "bar", 1, 1, true);
		
			Assert.AreEqual(2, this.point.AbsoluteNumber);
			Assert.AreEqual(1, this.point.RelativeNumber);
			Assert.AreEqual("foo.txt", this.point.Filename);
			Assert.AreEqual("bar", this.point.Namespace);
			Assert.IsTrue(this.point.Hit);
		}
Пример #2
0
		public void TestConstructors()
		{
			Coverage coverage;

			coverage = new Coverage();
			Assert.IsNotNull(coverage.Settings);

			ReportSettings settings = new ReportSettings();
			CoveragePoint[] points = new CoveragePoint[0];

			coverage = new Coverage(settings, points);
			Assert.AreEqual(settings, coverage.Settings);
			Assert.AreEqual(points, coverage.CoveragePoints);
		}
Пример #3
0
		public void SetUp()
		{
			this.point = new CoveragePoint();
			this.point2 = new CoveragePoint();
		}
Пример #4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Coverage"/> class.
        /// </summary>
        /// <param name="settings">The settings.</param>
        /// <param name="points">The points.</param>
		public Coverage(ReportSettings settings, CoveragePoint[] points)
		{
			this.settings = settings;
			this.CoveragePoints = points;
		}
Пример #5
0
		private string AddCoveragePoint(int Index)
		{
			CoveragePoint point = new CoveragePoint(filename, GetNamespace(Index), coveragepoints.Count + 1, baseCoveragePoint, false);
			coveragepoints.Add(point);

			point.LineNumber = IndexToLineNumber(Index);

			return point.GetCoverageCode(this.settings);
		}