public void PowerHigherThan220_Ok() { var mock = new Mock <IPowerSupply>(); mock.Setup(ps => ps.GetPower()).Returns(() => 220); var fan = new DeskFan(mock.Object); var actual = fan.word(); var expected = "ΣÏÕ"; Assert.Equal(actual, expected); }
public void PowerLowerThanZero_OK() { var mock = new Mock <IPowerSupply>(); mock.Setup(ps => ps.GetPower()).Returns(() => 0); /// //var fan = new DeskFan(new PowerSupplyLowerThanZero()); var fan = new DeskFan(mock.Object); var expected = "ûµç"; var actual = fan.word(); Assert.Equal(expected, actual); }