Go to https://bunit.dev/docs/providing-input/inject-services-into-components.html#injecting-services-in-tests then the code example looks like
Services.AddSingleton<IWeatherForecastService>(new WeatherForecastService());
// RenderComponent will inject the service in the WeatherForecasts component
// when it is instantiated and rendered.
var cut = RenderComponent<WeatherForecasts>();
// Assert that service is injected
Assert.NotNull(cut.Instance.Forecasts);
}
If we look to the actual file which generated this sample then we observe no errors there.
We'd expect the generated documentation to look like
Services.AddSingleton<IWeatherForecastService>(new WeatherForecastService());
// RenderComponent will inject the service in the WeatherForecasts component
// when it is instantiated and rendered.
var cut = RenderComponent<WeatherForecasts>();
// Assert that service is injected
Assert.NotNull(cut.Instance.Forecasts);
Let me know if there's a fix I can do.
Go to https://bunit.dev/docs/providing-input/inject-services-into-components.html#injecting-services-in-tests then the code example looks like
If we look to the actual file which generated this sample then we observe no errors there.
We'd expect the generated documentation to look like
Let me know if there's a fix I can do.