This is an automated email from the ASF dual-hosted git repository.

orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new 5379d2e3d7c (chores) camel-fhir: use Assumptions to check for test 
pre-conditions
5379d2e3d7c is described below

commit 5379d2e3d7c4f547be0bc7545e9f90d1368a7716
Author: Otavio Rodolfo Piske <[email protected]>
AuthorDate: Wed Jun 28 16:44:59 2023 +0200

    (chores) camel-fhir: use Assumptions to check for test pre-conditions
---
 .../org/apache/camel/component/fhir/AbstractFhirTestSupport.java  | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git 
a/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/AbstractFhirTestSupport.java
 
b/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/AbstractFhirTestSupport.java
index 17756814974..70800bd9c9b 100644
--- 
a/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/AbstractFhirTestSupport.java
+++ 
b/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/AbstractFhirTestSupport.java
@@ -30,13 +30,11 @@ import org.apache.camel.test.junit5.CamelTestSupport;
 import org.hl7.fhir.r4.model.Bundle;
 import org.hl7.fhir.r4.model.HumanName;
 import org.hl7.fhir.r4.model.Patient;
+import org.junit.jupiter.api.Assumptions;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.TestInstance;
 import org.junit.jupiter.api.extension.RegisterExtension;
 
-import static org.junit.jupiter.api.Assertions.assertFalse;
-import static org.junit.jupiter.api.Assertions.assertTrue;
-
 /**
  * Abstract base class for Fhir Integration tests generated by Camel API 
component maven plugin.
  */
@@ -54,10 +52,10 @@ public abstract class AbstractFhirTestSupport extends 
CamelTestSupport {
     public void cleanFhirServerState() {
         if (patientExists()) {
             deletePatient();
-            assertFalse(patientExists());
+            Assumptions.assumeFalse(patientExists(), "The test cannot proceed: 
a patient should not exist");
         }
         createPatient();
-        assertTrue(patientExists());
+        Assumptions.assumeTrue(patientExists(), "The test cannot proceed: a 
patient was just created and it should exist");
     }
 
     boolean patientExists() {

Reply via email to