com.websudos.util.testing

DefaultSamplers

trait DefaultSamplers extends Generators

Linear Supertypes
Generators, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. DefaultSamplers
  2. Generators
  3. AnyRef
  4. 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. implicit object BigDecimalSampler extends Sample[BigDecimal]

  7. implicit object BigIntSampler extends Sample[BigInt]

  8. implicit object CitySampler extends Sample[City]

  9. implicit object CountryCodeSampler extends Sample[CountryCode]

  10. implicit object CountrySampler extends Sample[Country]

  11. implicit object DateSample extends Sample[Date]

  12. implicit object DateTimeSampler extends Sample[DateTime]

  13. implicit object DoubleSample extends Sample[Double]

  14. implicit object EmailSample extends Sample[EmailAddress]

  15. implicit object FirstNameSampler extends Sample[FirstName]

  16. implicit object FloatSample extends Sample[Float]

  17. implicit object FullNameSampler extends Sample[FullName]

  18. implicit object IntSample extends Sample[Int]

  19. implicit object LastNameSampler extends Sample[LastName]

  20. implicit object LocalDateSampler extends Sample[LocalDate]

  21. implicit object LongSample extends Sample[Long]

  22. implicit object LoremIpsumSampler extends Sample[LoremIpsum]

  23. implicit object ProgrammingLanguageSampler extends Sample[ProgrammingLanguage]

  24. implicit object StringSample extends Sample[String]

  25. implicit object UUIDSample extends Sample[UUID]

  26. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  27. def clone(): AnyRef

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

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

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  31. 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.

    Definition Classes
    Generators
  32. 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.

    Definition Classes
    Generators
  33. def genList[T](size: Int = 5)(implicit arg0: Sample[T]): List[T]

    Definition Classes
    Generators
  34. 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.

    Definition Classes
    Generators
  35. 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.

    Definition Classes
    Generators
  36. def genMap[T](size: Int = 5)(implicit arg0: Sample[T]): Map[String, T]

    Definition Classes
    Generators
  37. def genOpt[T](implicit arg0: Sample[T]): Option[T]

    Definition Classes
    Generators
  38. final def getClass(): Class[_]

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

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

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

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

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

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

    Definition Classes
    AnyRef
  45. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Generators

Inherited from AnyRef

Inherited from Any

Ungrouped