/*
 * (C) Copyright 2015 Boni Garcia (http://bonigarcia.github.io/)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */
package io.github.bonigarcia.wdm.test;

import static io.github.bonigarcia.wdm.DriverManagerType.EDGE;
import static io.github.bonigarcia.wdm.WebDriverManager.edgedriver;
import static java.lang.invoke.MethodHandles.lookup;
import static org.apache.commons.io.FileUtils.cleanDirectory;
import static org.apache.commons.lang3.SystemUtils.IS_OS_WINDOWS;
import static org.junit.Assert.assertTrue;
import static org.junit.Assume.assumeFalse;
import static org.junit.Assume.assumeTrue;
import static org.slf4j.LoggerFactory.getLogger;

import java.io.File;
import java.io.IOException;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.slf4j.Logger;

import io.github.bonigarcia.wdm.Downloader;
import io.github.bonigarcia.wdm.WebDriverManagerException;

/**
 * Test with Microsoft Edge forcing to extract MSI file.
 *
 * @author Boni Garcia (boni.gg@gmail.com)
 * @since 2.1.0
 */
public class EdgeMsiTest {

    final Logger log = getLogger(lookup().lookupClass());

    @Before
    @After
    public void cleanCache() throws IOException {
        cleanDirectory(new File(new Downloader(EDGE).getTargetPath()));
    }

    @Test(expected = WebDriverManagerException.class)
    public void testMsiOutWindows() {
        assumeFalse(IS_OS_WINDOWS);
        edgedriver().version("2.10586").setup();
    }

    @Test
    public void testMsiInWindows() {
        assumeTrue(IS_OS_WINDOWS);
        edgedriver().version("2.10586").setup();
        File binary = new File(edgedriver().getBinaryPath());
        log.debug("Edge driver {}", binary);
        assertTrue(binary.getName().endsWith(".exe"));
    }

}

@@ -668,71 +668,8 @@
 t;%0A%0A
-import static io.github.bonigarcia.wdm.DriverManagerType.EDGE;%0A
 impo
@@ -807,1098 +807,366 @@
 org.
-apache.commons.io.FileUtils.cleanDirectory;%0Aimport static org.apache.commons.lang3.SystemUtils.IS_OS_WINDOWS;%0Aimport static org.junit.Assert.assertTrue;%0Aimport static org.junit.Assume.assumeFalse;%0Aimport static org.junit.Assume.assumeTrue;%0Aimport static org.slf4j.LoggerFactory.getLogger;%0A%0Aimport java.io.File;%0Aimport java.io.IOException;%0A%0Aimport org.junit.After;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.slf4j.Logger;%0A%0Aimport io.github.bonigarcia.wdm.Downloader;%0Aimport io.github.bonigarcia.wdm.WebDriverManagerException;%0A%0A/**%0A * Test with Microsoft Edge forcing to extract MSI file.%0A *%0A * @author Boni Garcia (boni.gg@gmail.com)%0A * @since 2.1.0%0A */%0Apublic class EdgeMsiTest %7B%0A%0A    final Logger log = getLogger(lookup().lookupClass());%0A%0A    @Before%0A    @After%0A    public void cleanCache() throws IOException %7B%0A        cleanDirectory(new File(new Downloader(EDGE).getTargetPath()));%0A    %7D%0A%0A    @Test(expected = WebDriverManagerException.class)%0A    public void testMsiOutWindows() %7B%0A        assumeFalse(IS_OS_WINDOWS);%0A        edgedriver().version(%222.10586%22).setup();%0A    %7D
+junit.Assert.assertTrue;%0Aimport static org.slf4j.LoggerFactory.getLogger;%0A%0Aimport java.io.File;%0A%0Aimport org.junit.Test;%0Aimport org.slf4j.Logger;%0A%0A/**%0A * Test with Microsoft Edge forcing to extract MSI file.%0A *%0A * @author Boni Garcia (boni.gg@gmail.com)%0A * @since 2.1.0%0A */%0Apublic class EdgeMsiTest %7B%0A%0A    final Logger log = getLogger(lookup().lookupClass());
 %0A%0A  
@@ -1214,43 +1214,8 @@
 ) %7B%0A
-        assumeTrue(IS_OS_WINDOWS);%0A
     

Simplify Edge test