@IntegrationTest public class FlexibleSearchServiceGetModelByExampleTest extends ServicelayerTransactionalBaseTest
FlexibleSearchService.getModelByExample(Object) method will get a model (representing a persisted item)
by passing an example model with partly filled values. For gathering the correct model a flexiblesearch has to be
generated from filled model values to gather the persisted model.jaloSession| Constructor and Description |
|---|
FlexibleSearchServiceGetModelByExampleTest() |
| Modifier and Type | Method and Description |
|---|---|
void |
setUp() |
void |
testBigChangedAttributeTestFail() |
void |
testBigChangedAttributeTestSuccessfull() |
void |
testModelNotFoundOnRemovedItem() |
void |
testSearchWithComposedTypeParameter() |
void |
testWithNoModel()
Just in case: an exception should be thrown if the example isn't a model.
|
void |
testWithNotSearchableValue()
A search with a wrong set of optional values set (no related entry in system) will fail with
ModelNotFoundException. |
void |
testWithNoValuesFail()
An example without any values set is not permitted and will throw a
ModelLoadingException. |
void |
testWithNullFail()
A null value is not permitted and will throw a
IllegalArgumentException. |
void |
testWithOptionalValuesAmbigiuous()
A search with an ambiguous set of optional values will will with
AmbiguousIdentifierException. |
void |
testWithOptionalValuesFail()
A search with a wrong set of optional values set (no related entry in system) will fail with
ModelNotFoundException. |
void |
testWithOptionalValuesLocalizedFail()
Search with localized values is possible.
|
void |
testWithOptionalValuesLocalizedSuccess()
Search with localized values is possible.
|
void |
testWithOptionalValuesSuccess()
A search with only optional values set will succeed in general (like for unique values), restrictions on kind of
optional attributes will be covered in later cases.
|
void |
testWithSavedExample()
A search with an already persisted model will fail with a
ModelLoadingException. |
void |
testWithSomeOptionalValuesLocalizedFail() |
void |
testWithSomeOptionalValuesLocalizedSuccess() |
void |
testWithSuperTypeSuccess()
A search using a super model will succeed and return correct sub model.
|
void |
testWithUniqueAndOptionalValuesFail()
A search with not matching optional values will throw a
ModelNotFoundException. |
void |
testWithUniqueAndOptionalValuesSuccess()
A search with unique and optional values set should succeed in general where the optional values will be used too
at query.
|
void |
testWithUniqueValuesAttachedToSessionFail()
A search with models attached to session can be used.
|
void |
testWithUniqueValuesAttachedToSessionSuccess()
A search with models attached to session can be used.
|
void |
testWithUniqueValuesFail()
If no entry with unique attribute set can be found a
ModelNotFoundException will be thrown. |
void |
testWithUniqueValuesSuccess()
A search by unique identifiers should succeed if there is exactly one entry fulfilling unique attribute values.
|
void |
testWithWrongType()
At search the composedtype of passed model has to be respected, means only models with that type or subtypes will
be returned.
|
autowireProperties, getApplicationContext, getBeanName, prepareApplicationContextAndSessionestablishJaloSession, finish, getOrCreateCurrency, getOrCreateLanguage, init, intenseChecksActivated, takeJaloSessionpublic FlexibleSearchServiceGetModelByExampleTest()
public void setUp()
throws java.lang.Exception
java.lang.Exceptionpublic void testWithNullFail()
IllegalArgumentException.public void testWithNoValuesFail()
ModelLoadingException.public void testWithUniqueValuesSuccess()
setUp() method.public void testWithUniqueValuesAttachedToSessionFail()
public void testWithUniqueValuesAttachedToSessionSuccess()
public void testWithUniqueValuesFail()
ModelNotFoundException will be thrown.public void testWithUniqueAndOptionalValuesSuccess()
public void testWithUniqueAndOptionalValuesFail()
ModelNotFoundException.public void testWithOptionalValuesSuccess()
public void testWithOptionalValuesLocalizedSuccess()
public void testWithOptionalValuesLocalizedFail()
public void testWithOptionalValuesFail()
ModelNotFoundException.public void testWithOptionalValuesAmbigiuous()
AmbiguousIdentifierException.public void testWithSavedExample()
ModelLoadingException.public void testWithNotSearchableValue()
ModelNotFoundException.public void testWithSuperTypeSuccess()
public void testWithWrongType()
public void testWithNoModel()
public void testWithSomeOptionalValuesLocalizedSuccess()
public void testWithSomeOptionalValuesLocalizedFail()
public void testBigChangedAttributeTestSuccessfull()
public void testBigChangedAttributeTestFail()
public void testSearchWithComposedTypeParameter()
public void testModelNotFoundOnRemovedItem()
throws ConsistencyCheckException
ConsistencyCheckExceptionCopyright © 2018 SAP SE. All Rights Reserved.