public JokesTests() { var services = new ServiceCollection(); services.AddSingleton <IGetJokesCatergories, GetJokesCategories>(); services.AddSingleton <IGetRandomJoke, GetRandomJoke>(); services.AddSingleton <IJokesServices, JokesServices>(); services.AddSingleton <IGetJokesCategoriesServices, GetJokesCategoriesService>(); var provider = services.BuildServiceProvider(); _jokesService = provider.GetService <IJokesServices>(); }
public JokesController(IJokesServices jokesServices) { _jokesServices = jokesServices; }
public JokesController(IJokesServices iJokesService) { _iJokesService = iJokesService; }