public void DoWithColor(Green green) { if (green != null) { _processor.Work(this, green); } }
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); }
public void Work(Green first, Red second) { IsGreenRed = true; }
public void Work(Red first, Green second) { IsRedGreen = true; }
public void Work(Green first, Green second) { IsGreenGreen = true; }