示例#1
0
        public void NewReportIsValid()
        {
            var projectReport = new ProjectReport();

            Assert.Zero(projectReport.NumTotalIssues);
            Assert.Zero(projectReport.GetNumIssues(IssueCategory.Code));
            Assert.Zero(projectReport.GetNumIssues(IssueCategory.ProjectSettings));
        }
示例#2
0
        public void UninitializedTestPasses()
        {
            var uninitialised = new ProjectReport();

            Assert.Zero(uninitialised.NumTotalIssues);
            Assert.Zero(uninitialised.GetNumIssues(IssueCategory.ApiCalls));
            Assert.Zero(uninitialised.GetNumIssues(IssueCategory.ProjectSettings));
        }
示例#3
0
        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));
        }
示例#4
0
        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));
        }