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