def setUp(self):  # pylint: disable=invalid-name
     """ Set up the fixture for the unit tests. """
     self.__report = FakeUnitTestReport()
     project = domain.Project(
         metric_sources={metric_source.UnitTestReport: self.__report})
     self.__metric = metric.FailingUnittests(subject=FakeSubject(),
                                             project=project)
 def test_status_with_zero_unittests(self):
     """ Test that the metric is red when there are no unit tests. """
     report = FakeUnitTestReport(unittests=0)
     project = domain.Project(
         metric_sources={metric_source.UnitTestReport: report})
     failing_unittests = metric.FailingUnittests(subject=FakeSubject(),
                                                 project=project)
     self.assertEqual('red', failing_unittests.status())
 def test_report_with_zero_unittests(self):
     """ Test that the report is different when there are no unit tests. """
     report = FakeUnitTestReport(unittests=0)
     project = domain.Project(
         metric_sources={metric_source.UnitTestReport: report})
     failing_unittests = metric.FailingUnittests(subject=FakeSubject(),
                                                 project=project)
     self.assertEqual('Er zijn geen unittesten.',
                      failing_unittests.report())
 def test_status_without_metric_source(self):
     """ Test that the metric is red when there is no metric source. """
     failing_unittests = metric.FailingUnittests(subject=FakeSubject(),
                                                 project=domain.Project())
     self.assertEqual('red', failing_unittests.status())