public void Init()

        { 

            amp = new Amplifier("Top-O-Line Amplifier");
            tuner = new Tuner("Top-O-Line Tuner",amp);
            dvd = new DvdPlayer("Top-O-Line DVD Player",amp);
            cd = new CdPlayer("Top-O-Line CD Player",amp);
            projector = new Projector("Top-O-Line Projector",dvd);
            lights = new TheaterLights("Theater Ceiling Lights");
            screen = new Screen("Theater Screen");
            popper = new PopcornPopper("Popcorn Popper");

            expectedWatchMovieOutput = new StringBuilder();

            expectedEndMovieOutput = new StringBuilder();

            expectedListenToCDOutput = new StringBuilder();

            expectedEndCDOutput = new StringBuilder();

            expectedListenToRadioOutput = new StringBuilder();

            expectedEndRadioOutput = new StringBuilder();

            homeTheater = new HomeTheaterFacade(amp,tuner,

                dvd,cd,projector,screen,lights,popper);

        }
예제 #2
0
 public void Dispose()
 {
     amp = null;
     tuner = null;
     dvd = null;
     cd = null;
     projector = null;
     lights = null;
     screen = null;
     popper = null;
     expectedWatchMovieOutput =  null;
     expectedEndMovieOutput = null;
     expectedListenToCDOutput = null;
     expectedEndCDOutput = null;
     expectedListenToRadioOutput = null;
     expectedEndRadioOutput = null;
     homeTheater = null;
 }
        public HomeTheaterFacade(Amplifier amp, 
			Tuner tuner, 
			DvdPlayer dvd, 
			CdPlayer cd, 
			Projector projector, 
			Screen screen,
			TheaterLights lights,
			PopcornPopper popper)
        {
            this.amp = amp;
            this.tuner = tuner;
            this.dvd = dvd;
            this.cd = cd;
            this.projector = projector;
            this.screen = screen;
            this.lights = lights;
            this.popper = popper;
        }