Exemplo n.º 1
0
        public static void Main()
        {
            var writer = new Writer();
            var reader = new Reader();

            var astronautRepository = new AstronautRepository();
            var planetRepository    = new PlanetRepository();
            var astronautFactory    = new AstronautFactory();
            var planetFactory       = new PlanetFactory();
            var mission             = new Mission();

            var controller = new Controller(
                astronautRepository,
                planetRepository,
                astronautFactory,
                planetFactory,
                mission);

            var engine = new Engine(
                writer,
                reader,
                controller);

            engine.Run();
        }
Exemplo n.º 2
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();
        }