예제 #1
0
        public static void Add(this ICollection <EpsilometerTest> epsilometerTests, Antibiotic antibiotic, float measurement = 0.25f, EpsilometerTestResult result = EpsilometerTestResult.Resistant)
        {
            var eTestAmpicillin = MockData.CreateInstance <EpsilometerTest>();

            eTestAmpicillin.EucastClinicalBreakpoint.Antibiotic = antibiotic;
            eTestAmpicillin.Measurement = measurement;
            eTestAmpicillin.Result      = result;
            epsilometerTests.Add(eTestAmpicillin);
        }
예제 #2
0
        public void DataTable_ContainsAntibioticMeasurements(string prefix, Antibiotic antibiotic, EpsilometerTestResult testResult, float measurement, string expectedTestResult, double expectedMeasurement)
        {
            var sut = CreateExportDefinition();

            Sending.Isolate.EpsilometerTests.Add(new EpsilometerTest
            {
                Result      = testResult,
                Measurement = measurement,
                EucastClinicalBreakpoint = new EucastClinicalBreakpoint {
                    Antibiotic = antibiotic
                }
            });

            var export = sut.ToDataTable(Sendings);

            export.Rows[0][$"{prefix}_SIR"].Should().Be(expectedTestResult);
            export.Rows[0][$"{prefix}_MIC"].Should().Be(expectedMeasurement);
        }