Пример #1
0
 public JwtTests(ServerFixture <Startup> serverFixture)
 {
     _serverFixture      = serverFixture;
     _authService        = _serverFixture.GetService <AuthService>();
     _jwtProviderService = _serverFixture.GetService <IJwtProviderService>();
     _jwtSettings        = _serverFixture.GetService <IOptions <JwtSettings> >().Value;
 }
Пример #2
0
        public void GetServices()
        {
            // analyzer is autoinjected while testing
            Assert.NotNull(_testFixure.GetService <RouteAnalyzer>());
            Assert.NotNull(_testFixure.GetService <ILogger <DemoTests> >());

            var rdns = _testFixure.GetService <RandomService>();

            Assert.NotNull(rdns);

            var number = rdns.GetRandomNumber();

            Assert.True(number >= 0);
        }
Пример #3
0
 public HasherTests(ServerFixture <Startup> serverFixture)
 {
     _serverFixture  = serverFixture;
     _passwordHasher = _serverFixture.GetService <IPasswordHasher <DummyUser> >();
 }
Пример #4
0
 public DemoTests(ServerFixture <Startup> testFixture)
 {
     _testFixure    = testFixture;
     _routeAnalyzer = _testFixure.GetService <RouteAnalyzer>();
     _randomService = _testFixure.GetService <RandomService>();
 }
 public TestControllerApi(ServerFixture <Startup> serverFixture)
 {
     _serverFixture = serverFixture;
     _libraryScope  = _serverFixture.GetService <LibraryDbScope>();
 }