org.scalatest

DuplicateTestNameException

class DuplicateTestNameException extends StackDepthException

Exception that indicates an attempt was made to register a test that had the same name as a test already registered in the same suite. The purpose of this exception is to encapsulate information about the stack depth at which the line of code that made this attempt resides, so that information can be presented to the user that makes it quick to find the problem line of code. (In other words, the user need not scan through the stack trace to find the correct filename and line number of the offending code.)

    authors:
  1. Bill Venners

Inherited
  1. Hide All
  2. Show all
  1. StackDepthException
  2. StackDepth
  3. RuntimeException
  4. Exception
  5. Throwable
  6. Serializable
  7. AnyRef
  8. Any
Visibility
  1. Public
  2. All

Instance constructors

  1. new DuplicateTestNameException(testName: String, failedCodeStackDepth: Int)

Value Members

  1. def !=(arg0: AnyRef): Boolean

  2. def !=(arg0: Any): Boolean

    o != arg0 is the same as !(o == (arg0)).

  3. def ##(): Int

  4. def $asInstanceOf[T0](): T0

  5. def $isInstanceOf[T0](): Boolean

  6. def ==(arg0: AnyRef): Boolean

    o == arg0 is the same as if (o eq null) arg0 eq null else o.equals(arg0).

  7. def ==(arg0: Any): Boolean

    o == arg0 is the same as o.equals(arg0).

  8. def asInstanceOf[T0]: T0

    This method is used to cast the receiver object to be of type T0.

  9. def canEqual(other: Any): Boolean

    Indicates whether this object can be equal to the passed object.

  10. val cause: Option[Throwable]

    An optional cause, the Throwable that caused this StackDepth exception to be thrown.

  11. def clone(): AnyRef

    This method creates and returns a copy of the receiver object.

  12. def eq(arg0: AnyRef): Boolean

    This method is used to test whether the argument (arg0) is a reference to the receiver object (this).

  13. def equals(other: Any): Boolean

    Indicates whether this object is equal to the passed object.

  14. def failedCodeFileNameAndLineNumberString: Option[String]

    A string that provides the filename and line number of the line of code that failed, suitable for presenting to a user, which is taken from this exception's StackTraceElement at the depth specified by failedCodeStackDepth.

  15. def fillInStackTrace(): Throwable

  16. def finalize(): Unit

    This method is called by the garbage collector on the receiver object when garbage collection determines that there are no more references to the object.

  17. def getCause(): Throwable

  18. def getClass(): java.lang.Class[_]

    Returns a representation that corresponds to the dynamic class of the receiver object.

  19. def getLocalizedMessage(): String

  20. def getMessage(): String

  21. def getStackTrace(): Array[StackTraceElement]

  22. def hashCode(): Int

    Returns a hash code value for this object.

  23. def initCause(throwable: Throwable): Throwable

  24. def isInstanceOf[T0]: Boolean

    This method is used to test whether the dynamic type of the receiver object is T0.

  25. val message: Option[String]

    An optional detail message for this StackDepth exception.

  26. def ne(arg0: AnyRef): Boolean

    o.ne(arg0) is the same as !(o.eq(arg0)).

  27. def notify(): Unit

    Wakes up a single thread that is waiting on the receiver object's monitor.

  28. def notifyAll(): Unit

    Wakes up all threads that are waiting on the receiver object's monitor.

  29. def printStackTrace(arg0: PrintWriter): Unit

  30. def printStackTrace(arg0: PrintStream): Unit

  31. def printStackTrace(): Unit

  32. def setStackTrace(arg0: Array[StackTraceElement]): Unit

  33. def severedAtStackDepth: DuplicateTestNameException

    Returns an exception of class DuplicateTestNameException with failedExceptionStackDepth set to 0 and all frames above this stack depth severed off.

  34. def synchronized[T0](arg0: T0): T0

  35. def toString(): String

    Returns a string representation of the object.

  36. def wait(): Unit

  37. def wait(arg0: Long, arg1: Int): Unit

  38. def wait(arg0: Long): Unit