예제 #1
0
 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()));
 }
예제 #2
0
        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);
        }