-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#11441 spring-context ....... 4.3.30.RELEASE -> 5.3.25
(update spring expression dependency to get rid of security issue) SpEL is need for campaigns. Added test to make sure needed dependencies are available on Android
- Loading branch information
1 parent
13ba9de
commit d4533e1
Showing
4 changed files
with
36 additions
and
8 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
...src/androidTest/java/de/symeda/sormas/app/campaign/CampaignFormDataFragmentUtilsTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package de.symeda.sormas.app.campaign; | ||
|
||
import static junit.framework.Assert.assertEquals; | ||
import static junit.framework.Assert.assertTrue; | ||
|
||
import java.util.Arrays; | ||
|
||
import org.junit.Test; | ||
import org.springframework.expression.spel.standard.SpelExpressionParser; | ||
|
||
import de.symeda.sormas.api.campaign.data.CampaignFormDataEntry; | ||
|
||
/** | ||
* This test is part of the android tests, to make sure | ||
* Spring expression languages and it's dependencies are correctly working. | ||
* | ||
* Execute this on a device with minimum android SDK version! | ||
*/ | ||
public class CampaignFormDataFragmentUtilsTest { | ||
|
||
@Test | ||
public void handleExpression() { | ||
Object result = CampaignFormDataFragmentUtils.getExpressionValue( | ||
new SpelExpressionParser(), | ||
Arrays.asList(new CampaignFormDataEntry("missedChildren", 3), new CampaignFormDataEntry("teamDidNotVisit", 2)), | ||
"missedChildren > 2 and teamDidNotVisit >= 2"); | ||
assertEquals(Boolean.TRUE, result); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters