public void TestSFPlayer()
 {
     IPlayer myPlayer = null;
     Movie myMovie = new Movie("Argo");
     myMovie = MovieFacade.Play(myPlayer, "SF", myMovie.Name);
     Debug.WriteLine(myMovie.WatchedOn);
     Assert.AreEqual(true, myMovie.HasBeenPlayed);
 }
예제 #2
0
 public static Movie Play(IPlayer myPlayer, string companyName, string movieName)
 {
     PlayerFactory myFactory = new PlayerFactory();
     myPlayer = myFactory.CreatePlayer(companyName);
     Movie myMovie = new Movie(movieName);
     myMovie.WatchedOn = myPlayer.PlayMovie(myMovie.Name);
     myMovie.HasBeenPlayed = true;
     return myMovie;
 }