Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide an easy way to validate whether a service is missing #381

Open
ivaylokenov opened this issue May 26, 2020 · 0 comments
Open

Provide an easy way to validate whether a service is missing #381

ivaylokenov opened this issue May 26, 2020 · 0 comments
Assignees
Labels
Milestone

Comments

@ivaylokenov
Copy link
Owner

Instead of validating services by hand. Additionally, validate every replaced service, because a user may replace something that is actually missing, and may think the services are working correctly.

public void ConfigureTestServices(IServiceCollection services)
        {
            base.ConfigureServices(services);

            ValidateServices(services);

            services.ReplaceTransient<UserManager<User>>(_ => IdentityFakes.FakeUserManager);
            services.ReplaceTransient<IJwtTokenGenerator>(_ => JwtTokenGeneratorFakes.FakeJwtTokenGenerator);
        }
@ivaylokenov ivaylokenov added this to the 3.1.0 milestone May 26, 2020
@ivaylokenov ivaylokenov self-assigned this May 26, 2020
@ivaylokenov ivaylokenov modified the milestones: 3.1.0, 5.0.0 Nov 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant