Exemplo n.º 1
0
        public async Task GetUserSectorsAsync_CallsService()
        {
            // act
            await userSectorsService.GetUserSectorsAsync();

            // assert
            await userSectorsService.Received(1).GetUserSectorsAsync();
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
 public async Task <IEnumerable <UserSectorsDto> > GetUserSectorsAsync()
 {
     return(await userSectorsService.GetUserSectorsAsync());
 }