Example #1
0
        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.");
        }
Example #2
0
        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.");
        }
Example #3
0
 private void CallFailingConstructor(IOGRFetcherConfiguration input)
 {
     var sut = new IOGRFetcher(new System.Net.Http.HttpClient(), input);
 }