示例#1
0
 public GymApplicationController(IGymApplicationRepository gar, IGymRepository gr, ISupportStaffRepository ssr, IApplicationCodeRepository acr, IMailer mail)
 {
     applicationRepository = gar;
     gymRepository         = gr;
     staffRepository       = ssr;
     codeRepository        = acr;
     mailer = mail;
 }
示例#2
0
 /*
  * 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;
 }
示例#3
0
        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);
        }