package de.ppi.samples.fuwesta.selophane.base;

import org.junit.rules.RuleChain;

import de.ppi.selenium.junit.DelegatingWebServer;
import de.ppi.selenium.junit.EventLogRule;
import de.ppi.selenium.junit.ProtocolRule;
import de.ppi.selenium.junit.WebDriverRule;
import de.ppi.selenium.junit.WebServerRule;
import de.ppi.webttest.util.TestWebServer;
import de.ppi.selenium.logevent.backend.H2EventStorage;

/**
 * Constants for webtest.
 *
 */
// CSOFFALL:
public interface WebTestConstants {

    TestWebServer WEB_SERVER = new TestWebServer("/fuwesta");

    /**
     * Standard_Rule for WebTests.
     */
    RuleChain WEBTEST_WITHOUT_AUTHENTICATION = RuleChain
            .outerRule(new WebServerRule(new DelegatingWebServer(WEB_SERVER)))
            .around(new EventLogRule(new H2EventStorage(
                    "jdbc:h2:./dbs/testlog;MODE=PostgreSQL;AUTO_SERVER=TRUE",
                    "sa", ""))).around(new WebDriverRule())
            .around(new ProtocolRule("weblog"));
    /**
     * Standard_Rule for WebTests.
     */
    RuleChain WEBTEST = RuleChain.outerRule(WEBTEST_WITHOUT_AUTHENTICATION)
            .around(new AuthRule());
}

@@ -550,16 +550,208 @@
 sta%22);%0A%0A
+    /**%0A     * The system to store the events.%0A     */%0A    H2EventStorage EVENT_STORAGE = new H2EventStorage(%0A            %22jdbc:h2:./dbs/testlog;MODE=PostgreSQL;AUTO_SERVER=TRUE%22, %22sa%22, %22%22);%0A%0A
     /**%0A
@@ -970,137 +970,36 @@
 ule(
-new H2EventStorage(%0A                    %22jdbc:h2:./dbs/testlog;MODE=PostgreSQL;AUTO_SERVER=TRUE%22,%0A                    %22sa%22, %22%22)))
+EVENT_STORAGE))%0A            
 .aro
@@ -1022,29 +1022,16 @@
 rRule())
-%0A            
 .around(
@@ -1223,10 +1223,11 @@
 ule());%0A
+%0A
 %7D%0A

Create a separate entry for the EVENT_STORAGE.