예제 #1
0
 public WatchHistoriesControllerTest(GlobalFixture fixture) : base(fixture)
 {
     _controller = new WatchHistoriesController(_context, _userUtils)
     {
         ControllerContext = fixture._controllerContext
     };
 }
예제 #2
0
 public CaptionsControllerTest(GlobalFixture fixture) : base(fixture)
 {
     _controller = new CaptionsController(
         (WakeDownloader)fixture._serviceProvider.GetService(typeof(WakeDownloader)),
         _context,
         new CaptionQueries(_context),
         null
         );
 }
예제 #3
0
 public UserOfferingsControllerTest(GlobalFixture fixture) : base(fixture)
 {
     _controller = new UserOfferingsController(
         fixture._authorizationService,
         _context,
         (MockUserManager)fixture._serviceProvider.GetService(typeof(MockUserManager)),
         _userUtils,
         null
         );
 }
예제 #4
0
 public PlaylistsControllerTest(GlobalFixture fixture) : base(fixture)
 {
     _controller = new PlaylistsController(
         fixture._authorizationService,
         (WakeDownloader)fixture._serviceProvider.GetService(typeof(WakeDownloader)),
         _context,
         _userUtils,
         null
         );
 }
예제 #5
0
        // 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
                );
        }
예제 #6
0
 public OfferingsControllerTest(GlobalFixture fixture) : base(fixture)
 {
     _controller = new OfferingsController(
         fixture._authorizationService,
         _context,
         _userUtils,
         null
         )
     {
         ControllerContext = fixture._controllerContext
     };
 }
예제 #7
0
 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
     };
 }
예제 #8
0
 public MongoTablesTests(GlobalFixture globalFixture)
 {
     this.global = globalFixture;
 }
예제 #9
0
 public InternalUserLoaderTests(GlobalFixture globalFixture)
 {
     this.global = globalFixture;
 }
예제 #10
0
 public EPubsControllerTest(GlobalFixture fixture) : base(fixture)
 {
     _controller = new EPubsController(null, _context, null, null);
 }
예제 #11
0
 public ResourceCacheServiceTests(GlobalFixture globalFixture)
 {
     this.global = globalFixture;
 }
예제 #12
0
        public ImagesControllerTest(GlobalFixture fixture) : base(fixture)
        {
            ILogger <ImagesController> logger = fixture._serviceProvider.GetService <ILogger <ImagesController> >();

            _controller = new ImagesController(_context, logger);
        }
예제 #13
0
 public UniversitiesControllerTest(GlobalFixture fixture) : base(fixture)
 {
     _controller = new UniversitiesController(_context, null);
 }
예제 #14
0
 public DepartmentsControllerTest(GlobalFixture fixture) : base(fixture)
 {
     _controller = new DepartmentsController(_context, null);
 }
 public CourseOfferingsControllerTest(GlobalFixture fixture) : base(fixture)
 {
     _controller = new CourseOfferingsController(fixture._authorizationService, _context, null);
 }
예제 #16
0
 public RedisCachesTests(GlobalFixture globalFixture)
 {
     this.global = globalFixture;
 }
예제 #17
0
 public TermsControllerTest(GlobalFixture fixture) : base(fixture)
 {
     _controller = new TermsController(_context, null);
 }
예제 #18
0
 public CoursesControllerTest(GlobalFixture fixture) : base(fixture)
 {
     _controller = new CoursesController(_context, null);
 }