io.sphere.sdk.meta.TestingDocumentation Maven / Gradle / Ivy
package io.sphere.sdk.meta;
/**
Client test doubles for unit tests
Since the clients are interfaces you can implement them to provide test doubles.
Here are some example to provide fake client responses in tests:
{@include.example io.sphere.sdk.client.TestsDemo#withJson()}
{@include.example io.sphere.sdk.client.TestsDemo#modelInstanceFromJson()}
Detailed example for creating test doubles
Go to impex playground and get some product data as String
So you have this:
And you can extract the data of one product:
With a function like
{@include.example io.sphere.sdk.client.ResourceUtil}
you can obtain a String from a resource file in the classpath of the test and replace values optionally:
{@include.example io.sphere.sdk.client.TestsDemo#replaceValuesInJsonStringDemo()}
*/
public class TestingDocumentation {
private TestingDocumentation() {
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy