Package com.google.jstestdriver

Source Code of com.google.jstestdriver.JsTestDriverModuleTest

/*
* Copyright 2009 Google Inc.
*
* 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 com.google.jstestdriver;

import com.google.common.collect.Lists;
import com.google.gson.JsonArray;
import com.google.inject.Guice;
import com.google.jstestdriver.guice.DebugModule;
import com.google.jstestdriver.guice.TestResultPrintingModule;
import com.google.jstestdriver.model.BasePaths;

import junit.framework.TestCase;

import java.io.File;
import java.util.Collections;

/**
* @author corysmith
*/
public class JsTestDriverModuleTest extends TestCase {
  public void testGetActionRunnerWithoutXmlPrinter() throws Exception {
    FlagsImpl flags = new FlagsImpl();
    Guice.createInjector(new TestResultPrintingModule(),
        new DebugModule(false),
        new JsTestDriverModule(flags,
        Collections.<FileInfo>emptySet(),
        "http://foo",
        "http://foo",
        System.out,
        new BasePaths(new File("")),
        2 * 60 * 60,
        Collections.<FileInfo>emptyList(),
        Collections.<FileInfo>emptyList(),
        new JsonArray())).getInstance(ActionRunner.class);
  }

  public void testGetActionRunnerWithXmlWriter() throws Exception {
    FlagsImpl flags = new FlagsImpl();
    Guice.createInjector(new TestResultPrintingModule(),
        new DebugModule(false),
        new JsTestDriverModule(flags,
        Collections.<FileInfo>emptySet(),
        "http://foo",
        "https://foo",
        System.out,
        new BasePaths(new File("")),
        2 * 60 * 60,
        Collections.<FileInfo>emptyList(),
        Collections.<FileInfo>emptyList(),
        new JsonArray())).getInstance(ActionRunner.class);
  }
}
TOP

Related Classes of com.google.jstestdriver.JsTestDriverModuleTest

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.