public void NewReportIsValid() { var projectReport = new ProjectReport(); Assert.Zero(projectReport.NumTotalIssues); Assert.Zero(projectReport.GetNumIssues(IssueCategory.Code)); Assert.Zero(projectReport.GetNumIssues(IssueCategory.ProjectSettings)); }
public void UninitializedTestPasses() { var uninitialised = new ProjectReport(); Assert.Zero(uninitialised.NumTotalIssues); Assert.Zero(uninitialised.GetNumIssues(IssueCategory.ApiCalls)); Assert.Zero(uninitialised.GetNumIssues(IssueCategory.ProjectSettings)); }
public void IssueIsAddedToReport() { var projectReport = new ProjectReport(); projectReport.AddIssue(new ProjectIssue ( new ProblemDescriptor(), "dummy issue", IssueCategory.ApiCalls ) ); Assert.AreEqual(1, projectReport.NumTotalIssues); Assert.AreEqual(1, projectReport.GetNumIssues(IssueCategory.ApiCalls)); Assert.AreEqual(0, projectReport.GetNumIssues(IssueCategory.ProjectSettings)); }
public void IssueIsAddedToReport() { var projectReport = new ProjectReport(); var p = new ProblemDescriptor ( 102001, "test", Area.CPU, "this is not actually a problem", "do nothing" ); projectReport.AddIssue(new ProjectIssue ( p, "dummy issue", IssueCategory.Code ) ); Assert.AreEqual(1, projectReport.NumTotalIssues); Assert.AreEqual(1, projectReport.GetNumIssues(IssueCategory.Code)); Assert.AreEqual(0, projectReport.GetNumIssues(IssueCategory.ProjectSettings)); }