Ejemplo n.º 1
0
        public void TestMethod()
        {
            RobotAdapter robotAdapter = new RobotAdapter("id", 42);

            robotAdapter.Recharge();

            Assert.Pass("Your first passing test");
        }
Ejemplo n.º 2
0
        private static void ImplementingAdapterPattern()
        {
            var robot = new RobotAdapter("Robot Adapter", 100);

            robot.Work(24);
            robot.Recharge();

            var employee = new EmployeeAdapter("Employee Adapter");

            employee.Work(8);
            employee.Sleep();

            var rechargeStation = new AdapterPattern.RechargeStation();

            rechargeStation.Recharge(robot);

            //rechargeStation.Recharge(empl); // error
        }