public void TryParse_Validdose_ReturnsTrueAndParsedDose(string doseStr, double expectedDoseValue, DoseUnit expectedDoseUnit) { var parsed = Dose.TryParse(doseStr, out var dose); Assert.That(parsed, Is.True); Assert.That(dose, Is.EqualTo(new Dose(expectedDoseValue, expectedDoseUnit))); }
public void TryParse_InvalidDose_ReturnsFalse(string doseStr) { var parsed = Dose.TryParse(doseStr, out _); Assert.That(parsed, Is.False); }