Fix enum looks by ids of wrong type

This commit is contained in:
2023-01-24 11:04:34 -06:00
parent e75b645639
commit 18a8656ba2
2 changed files with 63 additions and 1 deletions

View File

@ -116,6 +116,19 @@ class SearchPossibleValueSourceActionTest extends BaseTest
/*******************************************************************************
**
*******************************************************************************/
@Test
void testSearchPvsAction_enumByIdWrongType() throws QException
{
SearchPossibleValueSourceOutput output = getSearchPossibleValueSourceOutputById("2", TestUtils.POSSIBLE_VALUE_SOURCE_STATE);
assertEquals(1, output.getResults().size());
assertThat(output.getResults()).anyMatch(pv -> pv.getId().equals(2) && pv.getLabel().equals("MO"));
}
/*******************************************************************************
**
*******************************************************************************/
@ -172,6 +185,19 @@ class SearchPossibleValueSourceActionTest extends BaseTest
/*******************************************************************************
**
*******************************************************************************/
@Test
void testSearchPvsAction_tableByIdWrongType() throws QException
{
SearchPossibleValueSourceOutput output = getSearchPossibleValueSourceOutputById("2", TestUtils.POSSIBLE_VALUE_SOURCE_SHAPE);
assertEquals(1, output.getResults().size());
assertThat(output.getResults()).anyMatch(pv -> pv.getId().equals(2) && pv.getLabel().equals("Square"));
}
/*******************************************************************************
**
*******************************************************************************/