public WatchHistoriesControllerTest(GlobalFixture fixture) : base(fixture) { _controller = new WatchHistoriesController(_context, _userUtils) { ControllerContext = fixture._controllerContext }; }
public CaptionsControllerTest(GlobalFixture fixture) : base(fixture) { _controller = new CaptionsController( (WakeDownloader)fixture._serviceProvider.GetService(typeof(WakeDownloader)), _context, new CaptionQueries(_context), null ); }
public UserOfferingsControllerTest(GlobalFixture fixture) : base(fixture) { _controller = new UserOfferingsController( fixture._authorizationService, _context, (MockUserManager)fixture._serviceProvider.GetService(typeof(MockUserManager)), _userUtils, null ); }
public PlaylistsControllerTest(GlobalFixture fixture) : base(fixture) { _controller = new PlaylistsController( fixture._authorizationService, (WakeDownloader)fixture._serviceProvider.GetService(typeof(WakeDownloader)), _context, _userUtils, null ); }
// This constructor is run before every test, ensuring a new context and in-memory DB for each test case // https://xunit.net/docs/shared-context public BaseControllerTest(GlobalFixture fixture) { var optionsBuilder = new DbContextOptionsBuilder <CTDbContext>() .UseInMemoryDatabase(databaseName: Guid.NewGuid().ToString()) .UseInternalServiceProvider(fixture._serviceProvider); _context = new CTDbContext(optionsBuilder.Options, null); _userUtils = new UserUtils( (MockUserManager)fixture._serviceProvider.GetService(typeof(MockUserManager)), _context ); }
public OfferingsControllerTest(GlobalFixture fixture) : base(fixture) { _controller = new OfferingsController( fixture._authorizationService, _context, _userUtils, null ) { ControllerContext = fixture._controllerContext }; }
public AccountControllerTest(GlobalFixture fixture) : base(fixture) { _controller = new AccountController( (MockUserManager)fixture._serviceProvider.GetService(typeof(MockUserManager)), (MockSignInManager)fixture._serviceProvider.GetService(typeof(MockSignInManager)), _context, _userUtils, new NullLogger <AccountController>() ) { ControllerContext = fixture._controllerContext }; }
public MongoTablesTests(GlobalFixture globalFixture) { this.global = globalFixture; }
public InternalUserLoaderTests(GlobalFixture globalFixture) { this.global = globalFixture; }
public EPubsControllerTest(GlobalFixture fixture) : base(fixture) { _controller = new EPubsController(null, _context, null, null); }
public ResourceCacheServiceTests(GlobalFixture globalFixture) { this.global = globalFixture; }
public ImagesControllerTest(GlobalFixture fixture) : base(fixture) { ILogger <ImagesController> logger = fixture._serviceProvider.GetService <ILogger <ImagesController> >(); _controller = new ImagesController(_context, logger); }
public UniversitiesControllerTest(GlobalFixture fixture) : base(fixture) { _controller = new UniversitiesController(_context, null); }
public DepartmentsControllerTest(GlobalFixture fixture) : base(fixture) { _controller = new DepartmentsController(_context, null); }
public CourseOfferingsControllerTest(GlobalFixture fixture) : base(fixture) { _controller = new CourseOfferingsController(fixture._authorizationService, _context, null); }
public RedisCachesTests(GlobalFixture globalFixture) { this.global = globalFixture; }
public TermsControllerTest(GlobalFixture fixture) : base(fixture) { _controller = new TermsController(_context, null); }
public CoursesControllerTest(GlobalFixture fixture) : base(fixture) { _controller = new CoursesController(_context, null); }