public Controller() { this.astronautRepository = new AstronautRepository(); this.astronautFactory = new AstronautFactory(); this.planetRepository = new PlanetRepository(); this.planetsExplored = new List <IPlanet>(); }
public string AddAstronaut(string type, string astronautName) { if (!AstronautValidatorType.ValidateAstronautType(type)) { throw new InvalidOperationException(ExceptionMessages.InvalidAstronautType); } var newAstronaut = AstronautFactory.CreateAstronaut(type, astronautName); astrRepo.Add(newAstronaut); return(string.Format(OutputMessages.AstronautAdded, type, astronautName)); }
public Controller() { this.astronautRepository = new AstronautRepository(); this.planetRepository = new PlanetRepository(); this.astronautFactory = new AstronautFactory(); }