org.scalatest.Distributor.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of scalatest_2.9.3 Show documentation
Show all versions of scalatest_2.9.3 Show documentation
ScalaTest is a free, open-source testing toolkit for Scala and Java
programmers.
The newest version!
/* * Copyright 2001-2008 Artima, 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 org.scalatest /** * Trait whose instances facilitate parallel execution of's apply method. For example, aSuites. * An optionalDistributoris passed to therunmethod ofSuite. If a *Distributoris indeed passed, traitSuite's implementation ofrunwill * populate thatDistributorwith its nestedSuites (by passing them to theDistributor's *applymethod) rather than executing the nestedSuites directly. It is then up to another thread or process * to execute thoseSuites. * ** If you have a set of nested
* *Suites that must be executed sequentially, you can mix in trait *SequentialNestedSuiteExecution, which overridesrunNestedSuitesand * callssuper'srunNestedSuitesimplementation, passing inNonefor the *Distributor. ** Implementations of this trait must be thread safe. *
* * @author Bill Venners */ trait Distributor { /** * Puts aSuiteinto theDistributor. * * @param suite theSuiteto put into theDistributor. * @param tracker aTrackerto pass to theSuite'srunmethod. * * @throws NullPointerException if eithersuiteortrackerisnull. */ @deprecated("Please use the apply method that takes a Args instead, the one with this signature: def apply(Suite, Args)") def apply(suite: Suite, tracker: Tracker) /** * Puts aSuiteinto theDistributor. * ** The
Distributorcan decide which, if any, of the passedArgsSuiteDistributor* may pass itself wrapped in aSomein theArgsit passes to theSuite'srun* method instead of theargs.distributorvalue. * * * @param suite theSuiteto put into theDistributor. * @param args aArgscontaining objects that may be passed to theSuite's *runmethod via aArgsinstance. * * @throws NullPointerException if eithersuiteortrackerisnull. */ def apply(suite: Suite, args: Args): Status }
© 2015 - 2025 Weber Informatics LLC | Privacy Policy