public async void GetExternalService_ReturnNull() { var externalServiceService = new ExternalServiceService(_externalServiceRepository.Object, _secretVault.Object); var externalService = await externalServiceService.GetExternalService(2); Assert.Null(externalService); }
public async void GetExternalService_ReturnItem() { var externalServiceService = new ExternalServiceService(_externalServiceRepository.Object, _secretVault.Object); var entity = await externalServiceService.GetExternalService(1); Assert.NotNull(entity); Assert.Equal(1, entity.Id); _secretVault.Verify(s => s.Get("Github-Default", It.IsAny <CancellationToken>()), Times.Once); }