[InlineData("units=", false, OpenWeatherUrlProvider.QueryUnit.Kelvin)]  // Does not contain units and thus uses kelvin -> how to cover in one test case
        internal void SetUnitCorrectly(string SearchString, bool ShouldContain, OpenWeatherUrlProvider.QueryUnit UnitToSet)
        {
            IUrlProvider ProviderUnderTest = CreateDefaultUrlProvider();

            ProviderUnderTest.SetUnit(UnitToSet);

            if (ShouldContain)
            {
                Assert.Contains(SearchString, ProviderUnderTest.GetUriAsString());
            }
            else
            {
                Assert.DoesNotContain(SearchString, ProviderUnderTest.GetUriAsString());
            }
        }
        internal void SetModeCorrespondingToQueryMode(string ExpectedMode, OpenWeatherUrlProvider.QueryMode ModeToSet)
        {
            IUrlProvider ProviderUnderTest = CreateDefaultUrlProvider();

            ProviderUnderTest.SetMode(ModeToSet);

            Assert.Contains(ExpectedMode, ProviderUnderTest.GetUriAsString());
        }
        public void AddQueryParamterForTown(string LocationToSet)
        {
            IUrlProvider ProviderUnderTest = CreateDefaultUrlProvider();

            ProviderUnderTest.SetLocation(LocationToSet);

            Assert.Contains($"q={LocationToSet}", ProviderUnderTest.GetUriAsString());
        }
        public void EncodeUmlauteInQuery(string UmlautLocation, string ExpectedEncoding)
        {
            IUrlProvider ProviderUnderTest = CreateDefaultUrlProvider();

            ProviderUnderTest.SetLocation(UmlautLocation);

            Assert.Contains(ExpectedEncoding, ProviderUnderTest.GetUriAsString());
        }
        internal void SetLanguageCorrectly(string SearchString, OpenWeatherUrlProvider.QueryLanguage LanguageToSet)
        {
            IUrlProvider ProviderUnderTest = CreateDefaultUrlProvider();

            ProviderUnderTest.SetLanguage(LanguageToSet);

            Assert.Contains(SearchString, ProviderUnderTest.GetUriAsString());
        }
        public void ReplaceOldLocationWithNewWhenCallingSetLocationTwiceWhenLastParameter()
        {
            const string firstTown  = "Karlsruhe,de";
            const string secondTown = "Stuttgart,de";

            IUrlProvider providerUnderTest = CreateDefaultUrlProvider();

            providerUnderTest.SetLocation(firstTown);
            providerUnderTest.SetLocation(secondTown);
            var url = providerUnderTest.GetUriAsString();

            Assert.Contains(string.Concat("q=", secondTown), url);
            Assert.DoesNotContain(string.Concat("q=", firstTown), url);
        }
        public void AppendApiKeyAsFirstQueryParamter()
        {
            IUrlProvider ProviderUnderTest = CreateDefaultUrlProvider();

            Assert.Contains("?APPID=", ProviderUnderTest.GetUriAsString());
        }
        public void SetApiKeyDuringConstruction()
        {
            IUrlProvider ProviderUnderTest = CreateDefaultUrlProvider();

            Assert.Contains(string.Concat("APPID=", ApiKey), ProviderUnderTest.GetUriAsString());
        }
        public void SetBaseUrlDuringConstruction()
        {
            IUrlProvider ProviderUnderTest = CreateDefaultUrlProvider();

            Assert.Contains(baseUrl, ProviderUnderTest.GetUriAsString());
        }