public void ComputeCheckDigit_WhenValidCode_ReturnsExpectedValue(string code, int expectedValue) { // Act var checkDigit = BelgianMedicationCode.ComputeCheckDigit(code); // Assert checkDigit.Should().Be(expectedValue); }
public void MedicationUniqueIdentifier_WhenValidCode_ReturnsExpectedValue(string code, int expectedValue) { // Arrange var medicationCode = new BelgianMedicationCode(code); // Act var identifier = medicationCode.MedicationUniqueIdentifier(); // Assert identifier.Should().Be(expectedValue); }
public void CheckDigit_WhenValidCode_ReturnsExpectedValue(string code, int expectedValue) { // Arrange var medicationCode = new BelgianMedicationCode(code); // Act var checkDigit = medicationCode.CheckDigit(); // Assert checkDigit.Should().Be(expectedValue); }
private static PrescribedPharmaceuticalSubstance CreateSubstance(PrescribedMedicationState state) { return(new PrescribedPharmaceuticalSubstance ( state.NameOrDescription, state.Posology, state.Quantity, BelgianMedicationCode.CreateIfNotEmpty(state.Code), state.Identifier, state.EntityState )); }