public SecurityAdminController(UserManager <IdentityUser> userManager, RoleManager <IdentityRole> roleManager, ISponsorService sponsorService, ApplicationDbContext dbContext, ISubscriptionService subscriptionService, ITestDataUtility testDataUtility) { if (roleManager == null) { throw new ArgumentNullException(nameof(roleManager), $"{nameof(roleManager)} is null."); } if (sponsorService == null) { throw new ArgumentNullException("presidentService", "Argument cannot be null."); } if (userManager == null) { throw new ArgumentNullException(nameof(userManager), $"{nameof(userManager)} is null."); } _UserManager = userManager; _SponsorService = sponsorService; _RoleManager = roleManager; _Context = dbContext; _SubscriptionService = subscriptionService; _TestDataUtility = testDataUtility; }
public PresidentController(IPresidentService service, IValidatorStrategy <President> validator, ITestDataUtility testDataUtility ) { if (service == null) { throw new ArgumentNullException("service", "service is null."); } if (validator == null) { throw new ArgumentNullException("validator", "Argument cannot be null."); } _Validator = validator; _Service = service; _TestDataUtility = testDataUtility; }