/deep-sampler-examples

Examples for DeepSampler

Primary LanguageJavaMIT LicenseMIT

Build & Test

🎓 deep-sampler-examples

A collection of executable examples for DeepSampler 2.1.0

If you are using the previous version

Content

  1. Basic setup: The following examples demonstrate how to set up the basics for JUnit-tests with deepsampler. They also show, how methods can be stubbed using the Sample-API.
    1. JUnit4 & Spring
    2. JUnit4 & Guice
    3. JUnit5 & Spring
    4. JUnit5 & Guice
  2. Recording & Loading samples: The following examples demonstrate, how test data (samples) can be recorded at runtime, and how persistent samples can be loaded in tests.
    1. Saving and loading samples with default configuration
    2. Tweaking filenames and paths
    3. Adding custom JsonSerializers and JsonDeserializers to persist data, that cannot be persisted by DeepSampler out of the box
    4. Adding custom PersistenBeanExtensions to persist data, that cannot be persisted by DeepSampler out of the box
    5. Using custom matchers for persistent samplers
  3. Using the low-level-api without annotations: DeepSampler provides a low-level-api in case it is used without JUnit, or special configurations are necessary.
    1. Defining stubs
    2. Saving and loading samples to/from disk

License

DeepSampler and deep-sampler-examples are made available under the terms of the MIT License (see LICENSE.md).

Copyright 2022 PPI AG (Hamburg, Germany)