All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.sphere.sdk.meta.TestingDocumentation Maven / Gradle / Ivy

There is a newer version: 1.0.0-M26
Show newest version
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

API playground loading current product projections 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