public void Constructor_ApiKeyInGoodreadsSettingsIsNotNullOrWhiteSpaces_ServiceConstructed() { _goodreadsSettings.ApiKey = _validApiKey; Assert.DoesNotThrow(() => { var goodreadsService = new GoodreadsService( Mock.Of <HttpClient>(), new OptionsWrapper <GoodreadsSettings>(_goodreadsSettings)); }); }
public void Constructor_ApiKeyIsNullOrWhiteSpaces_ThrowsArgumentException(string apiKey) { _goodreadsSettings.ApiKey = apiKey; Assert.Throws <Exception>( () => { var goodreadsService = new GoodreadsService( Mock.Of <HttpClient>(), new OptionsWrapper <GoodreadsSettings>(_goodreadsSettings)); }); }