public void TestProperties() { Coverage coverage = new Coverage(); ReportSettings settings = new ReportSettings(); coverage.Settings = settings; Assert.AreEqual(settings, coverage.Settings); }
public void Setup() { this.settings = new ReportSettings(); this.settings.BaseDir = "c:\\foo\\"; this.settings.ReportName = "Test"; this.settings.ReportDir = "bar"; }
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); }
public TestParser(ReportSettings Settings) { this.settings = Settings; this.coveragepoints = new ArrayList(); AddCoveragePointDelegate addpointdel = new AddCoveragePointDelegate(this.AddCoveragePoint); this.matchers = new ArrayList(); this.matchers.Add(new StatementMatcher(addpointdel)); this.matchers.Add(new ConditionalMatcher(addpointdel)); this.matchers.Add(new CatchBlockMatcher(addpointdel)); this.matchers.Add(new MethodMatcher(addpointdel)); this.matchers.Add(new FlattenMatcher(addpointdel)); this.matchers.Add(new UnflattenMatcher(addpointdel)); }
public void TestGetCoverageCode() { string str = "SharpCover.Results.Add(@\"foo\", @\"" + Environment.CurrentDirectory + "\\bar\\foo-actual.xml\", 20)"; ReportSettings settings = new ReportSettings(); settings.ReportName = "foo"; settings.ReportDir = "bar"; this.point.AbsoluteNumber = 20; Parser parser = new Parser(settings); Assert.AreEqual(str, parser.GetCoverageCode(settings, this.point)); }
/// <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; }