Esempio n. 1
0
 /// <summary>
 /// The public static factory method accepting a PassengerType and bool (additional proxy logic)
 /// </summary>
 public static ProtectedPassenger Create(PassengerType type, bool isWearingSpaceSuit)
 {
     return(new ProtectedPassenger()
     {
         m_Passenger = PassengerCreator.Create(type), IsWearingSpaceSuit = isWearingSpaceSuit
     });
 }
Esempio n. 2
0
        private static void prepareForLaunch(PassengerType type)
        {
            var passenger = PassengerCreator.Create(type);

            con(passenger.Speak());
            con(passenger.LaunchCommand());
            hr();
        }
Esempio n. 3
0
        public FactoryFixture()
        {
            sut_ExpectedToy       = PassengerCreator.Create(PassengerType.Toy);
            sut_ExpectedAstronaut = PassengerCreator.Create(PassengerType.Astronaut);
            sut_ExpectedCosmonaut = PassengerCreator.Create(PassengerType.Cosmonaut);

            sut_ToyFactory       = new ToyFactory();
            sut_AstronautFactory = new AstronautFactory();
            sut_CosmonautFactory = new CosmonautFactory();
        }
Esempio n. 4
0
 public AstronautFixture()
 {
     sut_Passenger = PassengerCreator.Create(PassengerType.Astronaut);
 }
Esempio n. 5
0
 public CosmonautFixture()
 {
     sut_Passenger = PassengerCreator.Create(PassengerType.Cosmonaut);
 }
Esempio n. 6
0
 public ToyFixture()
 {
     sut_Passenger = PassengerCreator.Create(PassengerType.Toy);
 }