Do you have any idea how could I mock RiotGamesApi class or HttpHandler inside of it for unit testing purposes?
I wanted to unit test my service class which creates instance of RiotGamesApi like this and then uses it to retrieve summoners, matches etc data
private RiotGamesApi GetConfiguredRiotGamesApi(string riotApiKey) { var config = new RiotGamesApiConfig.Builder(riotApiKey).Build(); return RiotGamesApi.NewInstance(config); }
My only idea is to create a "wrapper" around this class but tbh it's not best solution
Do you have any idea how could I mock RiotGamesApi class or HttpHandler inside of it for unit testing purposes? I wanted to unit test my service class which creates instance of RiotGamesApi like this and then uses it to retrieve summoners, matches etc data
private RiotGamesApi GetConfiguredRiotGamesApi(string riotApiKey) { var config = new RiotGamesApiConfig.Builder(riotApiKey).Build(); return RiotGamesApi.NewInstance(config); }
My only idea is to create a "wrapper" around this class but tbh it's not best solution