public void CalculateOhmValue_invalidColorCode_ThrowsException(BandAColors bandAColor, BandBColors bandBColor, BandCColors bandCColor, BandDColors bandDColor, int expectedOhm) { var ex = Assert.Throws <System.ArgumentException>(() => calc.CalculateResistorValue(bandAColor.ToString(), bandBColor.ToString(), bandCColor.ToString(), bandDColor.ToString())); }
public void CalculateResistorValue_valid_enuminput(BandAColors bandAColor, BandBColors bandBColor, BandCColors bandCColor, BandDColors bandDColor, int expectedOhm) { int actualOhm = calc.CalculateResistorValue(bandAColor.ToString(), bandBColor.ToString(), bandCColor.ToString(), bandDColor.ToString()); Assert.AreEqual(expectedOhm, actualOhm); }