Package com.google.sitebricks.acceptance

Source Code of com.google.sitebricks.acceptance.JettyAcceptanceTest

package com.google.sitebricks.acceptance;

import com.google.sitebricks.acceptance.util.AcceptanceTest;
import com.google.sitebricks.acceptance.util.Jetty;
import org.testng.annotations.AfterSuite;
import org.testng.annotations.BeforeSuite;
import org.testng.annotations.Test;

import java.io.File;

/**
* @author Tom Wilson (tom@tomwilson.name)
*/
@Test(suiteName = AcceptanceTest.SUITE)
public class JettyAcceptanceTest {
  private static final String BUILDR_RESOURCE_DIR = "acceptance-test/src/main/resources";
  private static final String STD_RESOURCE_DIR = "src/main/resources";

  private Jetty server;

  public JettyAcceptanceTest() {
      File standardDir = new File(STD_RESOURCE_DIR);

      if (standardDir.exists()) {
        server = new Jetty(STD_RESOURCE_DIR);
      } else {
        server = new Jetty(BUILDR_RESOURCE_DIR);
      }
    }

    @BeforeSuite
    public void start() throws Exception {
        server.start();
    }

    @AfterSuite
    public void stop() throws Exception {
        server.stop();
    }
}
TOP

Related Classes of com.google.sitebricks.acceptance.JettyAcceptanceTest

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.