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

Unable to retrieve a required scan factory from IoC #100

Closed
Tracked by #45
derevnjuk opened this issue Dec 8, 2022 · 0 comments · Fixed by #103
Closed
Tracked by #45

Unable to retrieve a required scan factory from IoC #100

derevnjuk opened this issue Dec 8, 2022 · 0 comments · Fixed by #103
Assignees
Labels
Type: bug Something isn't working

Comments

@derevnjuk
Copy link
Member

derevnjuk commented Dec 8, 2022

The default scan factory is not registered using a ScanFactory interface as an injection token into the IoC container.

  [Fact]
  public void AddSecTesterScan_ReturnsScanFactory()
  {
    // arrange
    _services.AddSingleton(_config);
    _services.AddSecTesterBus();

    // act
    _services.AddSecTesterScan();

    // assert
    using var provider = _services.BuildServiceProvider();
    var result = provider.GetRequiredService<ScanFactory>();
    result.Should().BeOfType<ScanFactory>();
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants