Interface HypermediaFTUtil<E extends dev.daymor.sakuraboot.DataPresentation<I>,I extends Comparable<? super I> & Serializable>
- Type Parameters:
E
- The entity typeDataPresentation
.I
- The ID of type Comparable and Serializable.
- All Superinterfaces:
dev.daymor.sakuraboot.test.BasicTestUtil<E,
,I> SuperFTUtil<E,
,I> dev.daymor.sakuraboot.test.SuperITUtil<E,
,I> dev.daymor.sakuraboot.test.SuperTestUtil<I>
public interface HypermediaFTUtil<E extends dev.daymor.sakuraboot.DataPresentation<I>,I extends Comparable<? super I> & Serializable>
extends SuperFTUtil<E,I>
The interface for all the utility integration test function. This interface
provides common functions for testing hypermedia class.
Example:
To create a concrete util class that inherits from HypermediaFTUtil
,
follow these steps:
Implements the HypermediaFTUtil
interface:
@Component public class YourFTUtil // implements HypermediaFTUtil<YourEntity, YourIdType> { private final GlobalSpecification globalSpecification; @Autowired public YourFTUtil( final GlobalSpecification globalSpecification) { this.globalSpecification = globalSpecification; } @Override public GlobalSpecification getGlobalSpecification() { return globalSpecification; } @Override public Optional<YourEntity> createValidation ErrorEntity(YourIdType id) { return YourEntity.builder().id(id).build(); // If your class don't have a builder you can use the constructor } }
- Since:
- 0.1.0
- See Also:
-
Field Summary
Fields inherited from interface dev.daymor.sakuraboot.test.functional.SuperFTUtil
CAMEL_CASE_PATTERN
-
Method Summary
Modifier and TypeMethodDescriptiondefault String
addOtherLink
(Object body, String path) Return the additional links in the model.default String
Get the collection name used by the model.Methods inherited from interface dev.daymor.sakuraboot.test.BasicTestUtil
getDifferentEntity, getEntity, getEntityClass, getEntityWithoutId, getPartialEntity, getSecondEntity
Methods inherited from interface dev.daymor.sakuraboot.test.functional.SuperFTUtil
createValidationErrorEntity, getBiggerValidId, getControllerPackageName, getDtoPackageName, getEntityPackageName, getGlobalSpecification, getInvalidId, getMapperPackageName, getPath, getServicePackageName, getValidId
Methods inherited from interface dev.daymor.sakuraboot.test.SuperITUtil
getDifferentEntityWithId, getPartialEntityWithId
-
Method Details
-
addOtherLink
Return the additional links in the model.- Parameters:
body
- The expected body of the response.path
- The path use by the controller.- Returns:
- the other links.
-
entityCollectionName
Get the collection name used by the model.- Returns:
- The collection name.
-