public void TestMissingInputJsonFileThrowsException() { IOGRFetcherConfiguration testInput = new IOGRFetcherConfiguration() { InputJsonFile = string.Empty }; var ex = Assert.Throws <ArgumentException>(() => CallFailingConstructor(testInput)); Assert.AreEqual(ex.Message, "Missing configuration value: InputJsonFile. Cannot start application."); }
public void TestMissingIogrAppPermalinkBaseUrlThrowsException() { IOGRFetcherConfiguration testInput = new IOGRFetcherConfiguration() { InputJsonFile = "some value", IogrApiGenerateEndpoint = "some value", IogrAppPermalinkBaseUrl = string.Empty }; var ex = Assert.Throws <ArgumentException>(() => CallFailingConstructor(testInput)); Assert.AreEqual(ex.Message, "Missing configuration value: IogrAppPermalinkBaseUrl. Cannot start application."); }
private void CallFailingConstructor(IOGRFetcherConfiguration input) { var sut = new IOGRFetcher(new System.Net.Http.HttpClient(), input); }