public GymApplicationController(IGymApplicationRepository gar, IGymRepository gr, ISupportStaffRepository ssr, IApplicationCodeRepository acr, IMailer mail) { applicationRepository = gar; gymRepository = gr; staffRepository = ssr; codeRepository = acr; mailer = mail; }
/* * Method Name: * UserController * Purpose: * This method instantiates the repositories that will be used. */ public UserController(IUserRepository repoOne, IGymMemberRepository repoTwo, IGymRepository repoThree, INotificationSettingsRepository repoFour, IPasswordResetRepository repoFive, IMailer repoSix, IGymApplicationRepository repoSeven, IApplicationCodeRepository repoEight) { userGymMovesRepository = repoOne; gymMembersRepository = repoTwo; gymRepository = repoThree; notificationSettingRepository = repoFour; resetPasswordRepository = repoFive; mailer = repoSix; applicationRepository = repoSeven; codeRepository = repoEight; }
public GymApplicationTests() : base() { IConfigurationBuilder configurationBuilder = new ConfigurationBuilder(); configurationBuilder.AddJsonFile("appsettings.json"); IConfiguration configuration = configurationBuilder.Build(); /* Setup Repositories */ applicationRepository = new GymApplicationRepository(DbContext); gymRepository = new GymRepository(DbContext); staffRepository = new SupportStaffRepository(DbContext); codeRepository = new ApplicationCodeRepository(DbContext); mailer = new Mailer(configuration); /* Setup Controllers */ gymApplicationController = new GymApplicationController(applicationRepository, gymRepository, staffRepository, codeRepository, mailer); }