com.websudos.util.testing

Generators

sealed trait Generators extends AnyRef

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Generators
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. def gen[X, Y](implicit arg0: Sample[X], arg1: Sample[Y]): (X, Y)

    Generates a tuple of the given type arguments, using the implicit samplers in scope.

    Generates a tuple of the given type arguments, using the implicit samplers in scope.

    X

    The first type of the tuple to be sampled.

    Y

    The second type of the type to be sampled.

    returns

    A Tuple2[X, Y] generated using the implicit samplers.

  12. def gen[T](implicit arg0: Sample[T]): T

    Uses the type class available in implicit scope to mock a certain custom object.

    Uses the type class available in implicit scope to mock a certain custom object.

    T

    The parameter to mock.

    returns

    A sample of the given type generated using the implicit sampler.

  13. def genList[T](size: Int = 5)(implicit arg0: Sample[T]): List[T]

  14. def genMap[Key, Value](size: Int, producer: (Key) ⇒ Value)(implicit arg0: Sample[Key]): Map[Key, Value]

    Generates a map using a Sampler for the key and a function Key -> Value for the value.

    Generates a map using a Sampler for the key and a function Key -> Value for the value. Useful when the value of a key can be inferred by knowing the key itself.

    The implementation uses the value during mapping as the genMap function called with a single type argument will generate a Map[String, Type].

    Key

    The type of the Key to generate, needs to have a Sample available in scope.

    Value

    The type of the Value to generate.

    size

    The size of the map to generate.

    producer

    The function used to generate the value from a key.

    returns

    A map of the given size with sampled keys and values inferred by the producer function.

  15. def genMap[Key, Value](size: Int)(implicit arg0: Sample[Key], arg1: Sample[Value]): Map[Key, Value]

    Generates a map of known key -> value types using implicit samplers.

    Generates a map of known key -> value types using implicit samplers.

    Key

    The type of the key the generated map should have. Needs a Sample[Key] in scope.

    Value

    The type of the value the generated map should have. Needs a Sample[Value] in scope.

    size

    The number of elements to generate in the map.

    returns

    A key -> value map generated using the pre-defined samples for Key and Value.

  16. def genMap[T](size: Int = 5)(implicit arg0: Sample[T]): Map[String, T]

  17. def genOpt[T](implicit arg0: Sample[T]): Option[T]

  18. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  19. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  20. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  21. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  22. final def notify(): Unit

    Definition Classes
    AnyRef
  23. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  24. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  25. def toString(): String

    Definition Classes
    AnyRef → Any
  26. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped