public void Rto_FormulaForTimeToRecoverLessThan4()
        {
            // Act
            var result = RtoMetricLogic.FormulaForTimeToRecoverLessThan4();

            // Assert
            Assert.That(result, Is.EqualTo(Defaults.Scores.OneHundred));
        }
        public void Rto_FormulaForTimeToRecoverMoreThan48()
        {
            // Act
            var result = RtoMetricLogic.FormulaForTimeToRecoverMoreThan48();

            // Assert
            Assert.That(result, Is.EqualTo(Defaults.Scores.Zero));
        }
        public void Rto_FormulaForTimeToRecoverLessThan48(int timeToRecover, double expectedResult, double errorMargin)
        {
            // Act
            var result = RtoMetricLogic.FormulaForTimeToRecoverLessThan48(timeToRecover);

            // Assert
            Assert.That(Math.Abs((double)result - expectedResult), Is.LessThanOrEqualTo(errorMargin));
        }
 public void Setup()
 {
     this.gapsCollectionVerifier                 = new Mock <IGapsCollectionVerifier>();
     this.databaseRepository                     = new Mock <IDatabaseRepository>();
     this.metricDataService                      = new Mock <IMetricDataService>();
     this.recoveryObjectivesReporter             = new Mock <IRecoveryObjectivesReporter>();
     this.recoverabilityIntegritySummaryReporter = new Mock <IRecoverabilityIntegritySummaryReporter>();
     this.rtoMetricLogic = new RtoMetricLogic(
         this.gapsCollectionVerifier.Object,
         this.databaseRepository.Object,
         this.metricDataService.Object,
         this.recoveryObjectivesReporter.Object,
         this.recoverabilityIntegritySummaryReporter.Object);
 }