public static void Main(string[] args) { ISupervisor director = new Director(new Boss()); ISupervisor manager = new TechnicalManager(director); ISupervisor techLead = new TechLead(manager); IEmployee employee = new Employee(techLead); employee.RequestForLeave(10); Console.ReadKey(); }
public void StartCallCenter() { var fresher1 = new Fresher { Name = "Anna", Status = PersonStatus.CanTakeCall }; var fresher2 = new Fresher { Name = "Peter", Status = PersonStatus.Occupied }; var techlead1 = new TechLead { Name = "Sara", Status = PersonStatus.CanTakeCall }; var pm1 = new ProductManager { Name = "Maria", Status = PersonStatus.CanTakeCall }; var techlead2 = new TechLead { Name = "Magnus", Status = PersonStatus.CanTakeCall }; // Should result in exception }
static void Main(string[] args) { Console.WriteLine("Mediator"); Console.WriteLine("Chat Mediator Example"); var developer = new Developer(); var techlead = new TechLead(); var productManager = new ProductManager(); var chat = new Chat(); chat.Register(developer, techlead, productManager); productManager.Send(MessageType.Greetings); techlead.Send <Developer>(MessageType.Tasks); developer.Send <ProductManager>(MessageType.Tasks); productManager.Send <TechLead>(MessageType.Tasks); developer.Send(MessageType.Goodbyes); }
public void TechLead_CreateTwo_ShouldThrowException() { var t1 = new TechLead(); var t2 = new TechLead(); }
public void TechLead_CreateOne_ShouldBeOk() { var f1 = new TechLead(); Assert.IsNotNull(f1); }