public ChallengeController(IAuthenticationService authenticationService, IChallengesService challengesService, ISeasonService seasonService) : base(authenticationService) { _challengesService = challengesService; _seasonService = seasonService; }
public ChallengesController(IChallengesService challengesService, Lazy <UserManager <IdentityUser> > userManager, IAchievementsService achievementsService) { this.challengesService = challengesService; this.userManager = userManager; this.achievementsService = achievementsService; }
public ChallengeController( IUsersService usersService, IChallengesService challengesService, ISubmissionsService submissionsService, ISanitizer htmlSanitizer) : base(usersService) { Guard.WhenArgument(htmlSanitizer, nameof(htmlSanitizer)).IsNull().Throw(); Guard.WhenArgument(submissionsService, nameof(submissionsService)).IsNull().Throw(); Guard.WhenArgument(htmlSanitizer, nameof(htmlSanitizer)).IsNull().Throw(); this.challenges = challengesService; this.submissions = submissionsService; this.htmlSanitizer = htmlSanitizer; }
public void ThrowsArgumentNullException_WhenChallengesService_IsNull() { // Arrange var tracksServiceFake = new Mock <ITracksService>(); IChallengesService challengesService = null; var mapperFake = new Mock <IMappingProvider>(); var fileSystemFake = new Mock <IFileSystemService>(); var fileUtilsFake = new Mock <IFileUnits>(); // Act & Assert Assert.Throws <ArgumentNullException>(() => new ChallengeController( tracksServiceFake.Object, challengesService, fileSystemFake.Object, mapperFake.Object, fileUtilsFake.Object)); }
public ChallengeController( ITracksService tracks, IChallengesService challenges, IFileSystemService fileSystem, IMappingProvider mapper, IFileUnits fileUtils) { Guard.WhenArgument(tracks, nameof(tracks)).IsNull().Throw(); Guard.WhenArgument(mapper, nameof(mapper)).IsNull().Throw(); Guard.WhenArgument(challenges, nameof(challenges)).IsNull().Throw(); Guard.WhenArgument(fileSystem, nameof(fileSystem)).IsNull().Throw(); Guard.WhenArgument(fileUtils, nameof(fileUtils)).IsNull().Throw(); this.tracks = tracks; this.mapper = mapper; this.challenges = challenges; this.fileSystem = fileSystem; this.fileUtils = fileUtils; }
public ChallengeGridController(IChallengesService challengesService) { Guard.WhenArgument(challengesService, nameof(challengesService)).IsNull().Throw(); this.challenges = challengesService; }
public HomeController(IChallengesService challengesService) { this.challengesService = challengesService; }
public AchievementsService(IChallengesService challengesService, IIdentityUnitOfWork identityUnitOfWork) { this.challengesService = challengesService; this.identityUnitOfWork = identityUnitOfWork; }