com.outworkers.util.samplers

Sample

object Sample extends Generators

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

Type Members

  1. class BigDecimalSampler extends Sample[BigDecimal]

  2. class BigIntSampler extends Sample[BigInt]

  3. class BooleanSampler extends Sample[Boolean]

  4. class ByteSampler extends Sample[Byte]

  5. class CitySampler extends Sample[City]

  6. class CountryCodeSampler extends Sample[CountryCode]

  7. class CountrySampler extends Sample[Country]

  8. class DateSampler extends Sample[Date]

  9. class DoubleSampler extends Sample[Double]

  10. class EmailAddressSampler extends Sample[EmailAddress]

  11. class FirstNameSampler extends Sample[FirstName]

  12. class FloatSampler extends Sample[Float]

  13. class FullNameSampler extends Sample[FullName]

  14. class InetAddressSampler extends Sample[InetAddress]

  15. class IntSampler extends Sample[Int]

  16. class LastNameSampler extends Sample[LastName]

  17. class LongSampler extends Sample[Long]

  18. class LoremIpsumSampler extends Sample[LoremIpsum]

  19. class ProgrammingLanguageSampler extends Sample[ProgrammingLanguage]

  20. class ShortSampler extends Sample[Short]

  21. class ShortStringSampler extends Sample[ShortString]

  22. class StringSampler extends Sample[String]

  23. class UUIDSampler extends Sample[UUID]

  24. class UrlSampler extends Sample[Url]

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. def apply[RR]()(implicit ev: Sample[RR]): Sample[RR]

    Convenience method to materialise the context bound and return a reference to it.

    Convenience method to materialise the context bound and return a reference to it. This is somewhat shorter syntax than using implicitly.

    RR

    The type of the sample to retrieve.

    returns

    A reference to a concrete materialised implementation of a sample for the given type.

  7. def arbitrary[T](implicit arg0: Sample[T]): Arbitrary[T]

  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. def collection[M[X] <: TraversableOnce[X], T](implicit arg0: Sample[T], cbf: CanBuildFrom[Nothing, T, M[T]]): Sample[M[T]]

  11. val defaultGeneration: Int

    Definition Classes
    Generators
  12. def derive[T, T1](fn: (T) ⇒ T1)(implicit arg0: Sample[T]): Sample[T1]

    Derives samplers and encodings for a non standard type.

    Derives samplers and encodings for a non standard type.

    T

    The source type of the sampler, must already have a sampler defined for it.

    T1

    The type you want to derive a sampler for.

    fn

    The function that converts a T instance to a T1 instance.

    returns

    A new sampler that can interact with the target type.

  13. val domains: List[String]

    Attributes
    protected[this]
    Definition Classes
    Generators
  14. final def eq(arg0: AnyRef): Boolean

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

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. def gen[M[X] <: TraversableOnce[X], T](size: Int = defaultGeneration)(implicit cbf: CanBuildFrom[Nothing, T, M[T]], sampler: Sample[T]): M[T]

    Generates a list of elements based on an input collection type.

    Generates a list of elements based on an input collection type.

    M

    The type of collection to build

    T

    The type of the underlying sampled type.

    size

    The number of elements to generate

    cbf

    The implicit builder

    returns

    A Collection of "size" elements with type T.

    Definition Classes
    Generators
  18. 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
  19. def genList[T](size: Int = defaultGeneration)(implicit arg0: Sample[T]): List[T]

    Definition Classes
    Generators
  20. def genMap[A1, A2](size: Int = defaultGeneration)(implicit arg0: Sample[A1], arg1: Sample[A2], cbf: CanBuildFrom[Nothing, (A1, A2), Map[A1, A2]]): Map[A1, A2]

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

    Definition Classes
    Generators
  22. def genSet[T](size: Int = defaultGeneration)(implicit arg0: Sample[T]): Set[T]

    Definition Classes
    Generators
  23. def generator[T](implicit arg0: Sample[T]): Gen[T]

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

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

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

    Definition Classes
    Any
  27. def iso[T, T1](fn: (T) ⇒ T1)(implicit arg0: Sample[T]): Sample[T1]

  28. implicit def materialize[T]: Sample[T]

    !! Warning !! Black magic going on.

    !! Warning !! Black magic going on. This will use the excellent macro compat library to macro materialise an instance of the required primitive based on the type argument.

    T

    The type parameter to materialise a sample for.

    returns

    A derived sampler, materialised via implicit blackbox macros.

    Annotations
    @macroImpl( ... )
  29. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  32. def oneOf[T <: Enumeration](enum: T): Generators.oneOf.T.Value

    Definition Classes
    Generators
  33. def oneOf[T](list: Seq[T]): T

    Definition Classes
    Generators
  34. val protocols: List[String]

    Attributes
    protected[this]
    Definition Classes
    Generators
  35. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  36. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Generators

Inherited from AnyRef

Inherited from Any

Ungrouped