public JwtTests(ServerFixture <Startup> serverFixture) { _serverFixture = serverFixture; _authService = _serverFixture.GetService <AuthService>(); _jwtProviderService = _serverFixture.GetService <IJwtProviderService>(); _jwtSettings = _serverFixture.GetService <IOptions <JwtSettings> >().Value; }
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); }
public HasherTests(ServerFixture <Startup> serverFixture) { _serverFixture = serverFixture; _passwordHasher = _serverFixture.GetService <IPasswordHasher <DummyUser> >(); }
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>(); }