Exemplo n.º 1
0
        static void main()
        {
            var circle   = new Circle(2);
            var colored1 = new ColoredShapeCyclesAbsorbed(circle, "red");
            var colored2 = new ColoredShapeCyclesAbsorbed(colored1, "blue");

            WriteLine(colored2.AsString());
        }
Exemplo n.º 2
0
        public void TestOnCyclesAbsorbed()
        {
            var circle   = new Circle(2);
            var colored1 = new ColoredShapeCyclesAbsorbed(circle, "red");

            var colored2 = new ColoredShapeCyclesAbsorbed(colored1, "blue");

            Assert.AreEqual("A circle with radius 2 has the color red", colored2.AsString());
        }