Exemple #1
0
        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);
        }
Exemple #2
0
        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);
        }