@@ -0,0 +1,2755 @@
+/*%0A * (C) Copyright 2020 Boni Garcia (http://bonigarcia.github.io/)%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *   http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A *%0A */%0Apackage io.github.bonigarcia.wdm.test.edge;%0A%0Aimport static java.lang.String.format;%0Aimport static java.lang.invoke.MethodHandles.lookup;%0Aimport static org.junit.Assert.assertTrue;%0Aimport static org.slf4j.LoggerFactory.getLogger;%0A%0Aimport java.net.URL;%0Aimport java.nio.charset.Charset;%0Aimport java.nio.charset.StandardCharsets;%0Aimport java.util.List;%0Aimport java.util.Optional;%0A%0Aimport org.junit.Test;%0Aimport org.slf4j.Logger;%0A%0Aimport io.github.bonigarcia.wdm.WebDriverManager;%0Aimport io.github.bonigarcia.wdm.config.Config;%0Aimport io.github.bonigarcia.wdm.online.HttpClient;%0Aimport io.github.bonigarcia.wdm.versions.VersionDetector;%0A%0A/**%0A * Test asserting latest version of Edge in repository.%0A *%0A * @author Boni Garcia (boni.gg@gmail.com)%0A * @since 4.0.1%0A */%0Apublic class EdgeLatestVersionTest %7B%0A%0A    final Logger log = getLogger(lookup().lookupClass());%0A%0A    @Test%0A    public void edgeVersionTest() throws Exception %7B%0A        Config config = new Config();%0A        HttpClient httpClient = new HttpClient(config);%0A        VersionDetector versionDetector = new VersionDetector(config,%0A                httpClient);%0A        Optional%3CString%3E driverVersion = Optional.empty();%0A        URL driverUrl = new URL(%22https://msedgedriver.azureedge.net/%22);%0A        Charset versionCharset = StandardCharsets.UTF_16;%0A        String driverName = %22msedgedriver%22;%0A        String versionLabel = %22LATEST_STABLE%22;%0A%0A        Optional%3CString%3E driverVersionFromRepository = versionDetector%0A                .getDriverVersionFromRepository(driverVersion, driverUrl,%0A                        versionCharset, driverName, versionLabel, versionLabel);%0A        assertTrue(driverVersionFromRepository.isPresent());%0A        String edgeVersion = driverVersionFromRepository.get();%0A        log.debug(%22driverVersionFromRepository %7B%7D%22, edgeVersion);%0A%0A        List%3CString%3E driverVersions = WebDriverManager.edgedriver()%0A                .getDriverVersions();%0A        log.debug(%22All driverUrls %7B%7D%22, driverVersions);%0A        assertTrue(format(%22Stable version (%25s) is not in the URL list%22,%0A                edgeVersion), driverVersions.contains(edgeVersion));%0A%0A    %7D%0A%0A%7D%0A

Include test to check latest stable version for msedgedriver