// Path: testsuite/src/test/java/org/mvcspec/ozark/test/util/WebArchiveBuilder.java
// public class WebArchiveBuilder {
// 
//     private final WebArchive archive = ShrinkWrap.create(WebArchive.class);
//     private List<MavenDependency> additionalDependencies = new ArrayList<>();
// 
//     public WebArchiveBuilder addPackage(String packageName) {
//         archive.addPackage(packageName);
//         return this;
//     }
// 
//     public WebArchiveBuilder addView(Asset asset, String name) {
//         archive.addAsWebInfResource(asset, "views/" + name);
//         return this;
//     }
// 
//     public WebArchiveBuilder addView(File file, String name) {
//         return this.addView(new FileAsset(file), name);
//     }
// 
//     public WebArchiveBuilder addBeansXml() {
//         archive.addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml");
//         return this;
//     }
// 
//     public WebArchiveBuilder addDependencies(MavenDependency... dependencies) {
//         this.additionalDependencies.addAll(Arrays.asList(dependencies));
//         return this;
//     }
// 
//     public WebArchiveBuilder addDependency(String coordinates) {
//         addDependencies(MavenDependencies.createDependency(coordinates, ScopeType.RUNTIME,false));
//         return this;
//     }
// 
//     public WebArchive build() {
//         PomEquippedResolveStage stage = Maven.configureResolver().workOffline()
//             .withClassPathResolution(true)
//             .loadPomFromFile("pom.xml", System.getProperty("testsuite.profile"))
//             .importCompileAndRuntimeDependencies();
// 
//         if (!this.additionalDependencies.isEmpty()) {
//             stage = stage.addDependencies(this.additionalDependencies);
//         }
// 
//         return archive.addAsLibraries(stage.resolve().withTransitivity().asFile());
//     }
// 
// }


import static org.junit.Assert.assertEquals;
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.drone.api.annotation.Drone;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.arquillian.test.api.ArquillianResource;
import org.jboss.shrinkwrap.api.Archive;
import org.jboss.shrinkwrap.resolver.api.maven.ScopeType;
import org.jboss.shrinkwrap.resolver.api.maven.coordinate.MavenDependencies;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mvcspec.ozark.test.util.WebArchiveBuilder;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import java.net.URL;
import java.nio.file.Paths;
/*
 * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
 *
 * 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 org.mvcspec.ozark.test;




/**
 * Tests Mvc Implementation.
 *
 * @author Santiago Pericas-Geertsen
 */
@RunWith(Arquillian.class)
public class MvcIT {

    private static final String CSRF_PARAM = "_csrf";

    private static final String WEB_INF_SRC = "src/main/resources/mvc/";

    @ArquillianResource
    private URL baseURL;

    @Drone
    private WebDriver webDriver;

    @Deployment(testable = false, name = "thymeleaf")
    public static Archive createDeployment() {
// Path: testsuite/src/test/java/org/mvcspec/ozark/test/util/WebArchiveBuilder.java
// public class WebArchiveBuilder {
// 
//     private final WebArchive archive = ShrinkWrap.create(WebArchive.class);
//     private List<MavenDependency> additionalDependencies = new ArrayList<>();
// 
//     public WebArchiveBuilder addPackage(String packageName) {
//         archive.addPackage(packageName);
//         return this;
//     }
// 
//     public WebArchiveBuilder addView(Asset asset, String name) {
//         archive.addAsWebInfResource(asset, "views/" + name);
//         return this;
//     }
// 
//     public WebArchiveBuilder addView(File file, String name) {
//         return this.addView(new FileAsset(file), name);
//     }
// 
//     public WebArchiveBuilder addBeansXml() {
//         archive.addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml");
//         return this;
//     }
// 
//     public WebArchiveBuilder addDependencies(MavenDependency... dependencies) {
//         this.additionalDependencies.addAll(Arrays.asList(dependencies));
//         return this;
//     }
// 
//     public WebArchiveBuilder addDependency(String coordinates) {
//         addDependencies(MavenDependencies.createDependency(coordinates, ScopeType.RUNTIME,false));
//         return this;
//     }
// 
//     public WebArchive build() {
//         PomEquippedResolveStage stage = Maven.configureResolver().workOffline()
//             .withClassPathResolution(true)
//             .loadPomFromFile("pom.xml", System.getProperty("testsuite.profile"))
//             .importCompileAndRuntimeDependencies();
// 
//         if (!this.additionalDependencies.isEmpty()) {
//             stage = stage.addDependencies(this.additionalDependencies);
//         }
// 
//         return archive.addAsLibraries(stage.resolve().withTransitivity().asFile());
//     }
// 
// }


// Path: testsuite/src/test/java/org/mvcspec/ozark/test/MvcIT.java
import static org.junit.Assert.assertEquals;
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.drone.api.annotation.Drone;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.arquillian.test.api.ArquillianResource;
import org.jboss.shrinkwrap.api.Archive;
import org.jboss.shrinkwrap.resolver.api.maven.ScopeType;
import org.jboss.shrinkwrap.resolver.api.maven.coordinate.MavenDependencies;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mvcspec.ozark.test.util.WebArchiveBuilder;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import java.net.URL;
import java.nio.file.Paths;

/*
 * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
 *
 * 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 org.mvcspec.ozark.test;




/**
 * Tests Mvc Implementation.
 *
 * @author Santiago Pericas-Geertsen
 */
@RunWith(Arquillian.class)
public class MvcIT {

    private static final String CSRF_PARAM = "_csrf";

    private static final String WEB_INF_SRC = "src/main/resources/mvc/";

    @ArquillianResource
    private URL baseURL;

    @Drone
    private WebDriver webDriver;

    @Deployment(testable = false, name = "thymeleaf")
    public static Archive createDeployment() {
        return new WebArchiveBuilder()