public async Task GetUserSectorsAsync_CallsService() { // act await userSectorsService.GetUserSectorsAsync(); // assert await userSectorsService.Received(1).GetUserSectorsAsync(); }
public async Task GetUserSectorsAsync_CallsApi() { // arrange string endpoint = "endPoint"; configuration[EndPoints.Api.GetUserSectors].Returns(endpoint); // act await userSectorsService.GetUserSectorsAsync(); // asert await httpClient.Received(1).GetAsync <IEnumerable <UserSectorsDto> >(endpoint); }
public async Task <IEnumerable <UserSectorsDto> > GetUserSectorsAsync() { return(await userSectorsService.GetUserSectorsAsync()); }