public void PaintsWindowBordersOfARoom()
        {
            Color newColor = Color.Maroon;

            var sampleWindow = new Window { BorderColor = Color.White };

            House house = HouseBuilder.Create()
                .AddFloor()
                    .AddRoom()
                        .WithWindow(sampleWindow)
                .Build();

            this.testee = new HousePainter(house);
            this.testee.ChangeBorderColorOfAllWindows(newColor);

            sampleWindow.BorderColor.Should().Be(newColor);
        }
        public HouseBuilder WithWindow(Window window)
        {
            this.newestRoom.AddWindow(window);

            return this;
        }
Exemplo n.º 3
0
 public void AddWindow(Window window)
 {
     this.windows.Add(window);
 }