All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.gwt.junit.translatable.junit.framework.TestSuite Maven / Gradle / Ivy

/*
 * Copyright 2011 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 junit.framework;

import java.util.Enumeration;

/**
 * Translatable version of JUnit's TestSuite. Although
 * {@link com.google.gwt.junit.client.GWTTestCase GWTTestCase} does
 * not need to access anything above {@link TestCase}, also emulated
 * here, suites and tests are often intermixed. So having an empty
 * emulation tends to avoid spurious error messages, or out right
 * compile failures in -strict mode.
 * 

* There are a few methods useful to TestRunners which we can't * emulate for GWT; fortunately, we don't have to. But we do want to * include methods that a TestSuite might sensibly call on itself. * They don't have to do more than compile, though. *

* The missing methods are: *

    *
  1. static Constructor getTestConstructor(Class) *
  2. void run(TestResult) *
  3. public void runTest(Test, TestResult) *
*/ public class TestSuite implements Test { public static Test createTest(Class theClass, String name) { return null; } public static Test warning(final String message) { return null; } public TestSuite() { } public TestSuite(final Class theClass) { } public TestSuite(Class theClass, String name) { } public TestSuite(String name) { } public TestSuite(Class... classes) { } public TestSuite(Class[] classes, String name) { } public void addTest(Test test) { } public void addTestSuite(Class testClass) { } @Override public int countTestCases() { return 0; } public String getName() { return "** No op GWT emulation of TestSuite **"; } public void setName(String name) { } public Test testAt(int index) { return null; } public int testCount() { return 0; } public Enumeration tests() { return null; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy