Пример #1
0
 public void DoWithColor(Green green)
 {
     if (green != null)
     {
         _processor.Work(this, green);
     }
 }
Пример #2
0
 public void DoWithColor(Green green)
 {
     if (green != null)
     {
         _processor.Work(this, green);
     }
 }
Пример #3
0
        public void GreenWithRed()
        {
            var flags = new FlagColors();
            IColor greenColor = new Green(flags);
            IColor redColor = new Red(flags);
            greenColor.DoWith(redColor);

            Assert.IsTrue(flags.IsGreenRed);

            Assert.IsFalse(flags.IsGreenGreen);
            Assert.IsFalse(flags.IsRedGreen);
            Assert.IsFalse(flags.IsRedRed);
        }
Пример #4
0
 public void Work(Green first, Red second)
 {
     IsGreenRed = true;
 }
Пример #5
0
 public void Work(Red first, Green second)
 {
     IsRedGreen = true;
 }
Пример #6
0
 public void Work(Green first, Green second)
 {
     IsGreenGreen = true;
 }