public void TestLED() { IWattCalculator test = new Breadboard(); Assert.AreEqual(3.50, test.Measure()); test = new LED(test); Assert.AreEqual(12.36, test.Measure() - 3.50); }
public void TestComplicated() { double testWatts; IWattCalculator test = new ArduinoUno(); Assert.AreEqual(21.40, test.Measure()); testWatts = test.Measure(); test = new RGBLED(test); Assert.AreEqual(testWatts + 15.48, test.Measure()); testWatts = test.Measure(); test = new Buzzer(test); Assert.AreEqual(testWatts + 8.91, test.Measure()); testWatts = test.Measure(); test = new Resistor(test); Assert.AreEqual(testWatts + 17.24, test.Measure()); testWatts = test.Measure(); test = new LED(test); Assert.AreEqual(testWatts + 12.36, test.Measure()); }