Boyscouting (#558)

* Boyscouting: Docker conventions

* Boyscouting: JUnit 5 conventions ("It is generally recommended to omit the public modifier for test classes, test methods, and lifecycle methods unless there is a technical reason for doing so)"

* Boyscouting: typo in RepositoryValidationInterceptorFactoryDstu3

* Boyscouting: use List.of instead of Guava; use StandardCharsets instead of Guava; remove unused imports

---------

Co-authored-by: Gerlach, Winfried <Winfried.Gerlach@draeger.com>
This commit is contained in:
winne42
2023-07-11 23:53:18 +02:00
committed by GitHub
parent fdcd021e66
commit 484aa9deb5
17 changed files with 30 additions and 38 deletions

View File

@@ -11,7 +11,7 @@ import org.springframework.boot.test.context.SpringBootTest;
// "hapi.fhir.enable_repository_validating_interceptor=true",
"hapi.fhir.fhir_version=r4"
})
public class CustomBeanTest {
class CustomBeanTest {
@Autowired
some.custom.pkg1.CustomBean customBean1;

View File

@@ -21,7 +21,7 @@ import ca.uhn.fhir.rest.client.api.ServerValidationModeEnum;
"hapi.fhir.fhir_version=r4"
})
public class CustomInterceptorTest {
class CustomInterceptorTest {
@LocalServerPort
private int port;

View File

@@ -21,7 +21,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
"hapi.fhir.fhir_version=dstu2",
"spring.datasource.url=jdbc:h2:mem:dbr2",
})
public class ExampleServerDstu2IT {
class ExampleServerDstu2IT {
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ExampleServerDstu2IT.class);
private IGenericClient ourClient;

View File

@@ -49,7 +49,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
})
public class ExampleServerDstu3IT implements IServerSupport {
class ExampleServerDstu3IT implements IServerSupport {
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ExampleServerDstu2IT.class);
private IGenericClient ourClient;
@@ -71,8 +71,8 @@ public class ExampleServerDstu3IT implements IServerSupport {
ourClient.registerInterceptor(new LoggingInterceptor(true));
}
@Test
public void testCreateAndRead() {
@Test
void testCreateAndRead() {
String methodName = "testCreateResourceConditional";
@@ -154,7 +154,7 @@ public class ExampleServerDstu3IT implements IServerSupport {
}
@Test
public void testWebsocketSubscription() throws Exception {
void testWebsocketSubscription() throws Exception {
/*
* Create subscription
*/

View File

@@ -52,7 +52,7 @@ class ExampleServerR4BIT {
@Test
public void testBatchPutWithIdenticalTags() {
void testBatchPutWithIdenticalTags() {
String batchPuts = "{\n" +
"\t\"resourceType\": \"Bundle\",\n" +
"\t\"id\": \"patients\",\n" +

View File

@@ -87,7 +87,7 @@ class ExampleServerR4IT {
}
@Test
public void testBatchPutWithIdenticalTags() {
void testBatchPutWithIdenticalTags() {
String batchPuts = "{\n" +
"\t\"resourceType\": \"Bundle\",\n" +
"\t\"id\": \"patients\",\n" +

View File

@@ -45,15 +45,15 @@ public class ExampleServerR5IT {
private IGenericClient ourClient;
private FhirContext ourCtx;
public static final String SUBSCRIPTION_TOPIC_TEST_URL = "http://example.com/topic/test";
public static final String SUBSCRIPTION_TOPIC_TEST_URL = "http://example.com/topic/test";
@LocalServerPort
@LocalServerPort
private int port;
@Test
public void testCreateAndRead() {
void testCreateAndRead() {
String methodName = "testCreateResourceConditional";
@@ -66,7 +66,7 @@ public class ExampleServerR5IT {
}
@Test
public void testWebsocketSubscription() throws Exception {
void testWebsocketSubscription() throws Exception {
String endpoint = "ws://localhost:" + port + "/websocket";
/*
* Create topic

View File

@@ -26,7 +26,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
"hapi.fhir.partitioning.partitioning_include_in_search_hashes=false",
})
public class MultitenantServerR4IT {
class MultitenantServerR4IT {
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ExampleServerDstu2IT.class);
@@ -40,7 +40,7 @@ public class MultitenantServerR4IT {
@Test
public void testCreateAndReadInTenantA() {
void testCreateAndReadInTenantA() {
// Create tenant A
@@ -66,7 +66,7 @@ public class MultitenantServerR4IT {
}
@Test
public void testCreateAndReadInTenantB() {
void testCreateAndReadInTenantB() {
// Create tenant A

View File

@@ -18,7 +18,7 @@ public class SocketImplementation {
private final String myCriteria;
protected String myError;
protected boolean myGotBound;
private final List<String> myMessages = new ArrayList<String>();
private final List<String> myMessages = new ArrayList<>();
protected int myPingCount;
protected String mySubsId;
private Session session;