public SeasonService(ApplicationDbContext dbContext, IScheduleFactory scheduleFactory, ISeasonPointCalculator pointCalculator, ITieBreakerFactory tieBreakerFactory) { this.dbContext = dbContext; this.scheduleFactory = scheduleFactory; this.pointCalculator = pointCalculator; tieBreaker = tieBreakerFactory.Create(); }
public void SetUp() { dbContext = DbContextUtility.CreateMockDb(); scheduler = Substitute.For <IScheduleFactory>(); pointCalculator = Substitute.For <ISeasonPointCalculator>(); var tieBreakerFactory = Substitute.For <ITieBreakerFactory>(); tieBreaker = Substitute.For <ITieBreaker>(); tieBreakerFactory.Create().Returns(tieBreaker); testObj = new SeasonService(dbContext, scheduler, pointCalculator, tieBreakerFactory); }