Exemplo n.º 1
0
 public void Setup()
 {
     heater_     = Substitute.For <IHeater>();
     tempSensor_ = Substitute.For <ITempSensor>();
     temp        = 28;
     uut         = new EnvironmentControlSystem(temp, tempSensor_, heater_);
 }
Exemplo n.º 2
0
        public static void Main(string[] args)
        {
            var ecs = new EnvironmentControlSystem(28, new TempSensor(), new Heater());

            ecs.Regulate();

            ecs.SetThreshold(20);

            ecs.Regulate();

            System.Console.ReadLine();
        }