Object/Trait

com.outworkers.util.samplers

Sample

Related Docs: trait Sample | package samplers

Permalink

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
Visibility
  1. Public
  2. All

Type Members

  1. class BigDecimalSampler extends Sample[BigDecimal]

    Permalink
  2. class BigIntSampler extends Sample[BigInt]

    Permalink
  3. class BooleanSampler extends Sample[Boolean]

    Permalink
  4. class ByteSampler extends Sample[Byte]

    Permalink
  5. class CitySampler extends Sample[samplers.City]

    Permalink
  6. class CountryCodeSampler extends Sample[samplers.CountryCode]

    Permalink
  7. class CountrySampler extends Sample[samplers.Country]

    Permalink
  8. class DateSampler extends Sample[Date]

    Permalink
  9. class DoubleSampler extends Sample[Double]

    Permalink
  10. class EmailAddressSampler extends Sample[samplers.EmailAddress]

    Permalink
  11. class FirstNameSampler extends Sample[samplers.FirstName]

    Permalink
  12. class FloatSampler extends Sample[Float]

    Permalink
  13. class FullNameSampler extends Sample[samplers.FullName]

    Permalink
  14. class InetAddressSampler extends Sample[InetAddress]

    Permalink
  15. class IntSampler extends Sample[Int]

    Permalink
  16. class LastNameSampler extends Sample[samplers.LastName]

    Permalink
  17. class LongSampler extends Sample[Long]

    Permalink
  18. class LoremIpsumSampler extends Sample[samplers.LoremIpsum]

    Permalink
  19. class ProgrammingLanguageSampler extends Sample[samplers.ProgrammingLanguage]

    Permalink
  20. class ShortSampler extends Sample[Short]

    Permalink
  21. class ShortStringSampler extends Sample[samplers.ShortString]

    Permalink
  22. class StringSampler extends Sample[String]

    Permalink
  23. class UUIDSampler extends Sample[UUID]

    Permalink
  24. class UrlSampler extends Sample[samplers.Url]

    Permalink

Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. def apply[RR]()(implicit ev: Sample[RR]): Sample[RR]

    Permalink

    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.

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

    Permalink
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def clone(): AnyRef

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

    Permalink
  9. val defaultGeneration: Int

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

    Permalink

    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.

  11. val domains: List[String]

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

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

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

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

    Permalink

    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
  16. def gen[T](implicit arg0: Sample[T]): T

    Permalink

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

    Permalink
    Definition Classes
    Generators
  18. 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]

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

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

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

    Permalink
  22. final def getClass(): Class[_]

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

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

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

    Permalink
  26. implicit macro def materialize[T]: Sample[T]

    Permalink

    !! 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.

  27. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  28. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  29. final def notifyAll(): Unit

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

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

    Permalink
    Definition Classes
    Generators
  32. val protocols: List[String]

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

    Permalink
    Definition Classes
    AnyRef
  34. def toString(): String

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Generators

Inherited from AnyRef

Inherited from Any

Ungrouped