Fix new line after @Test (#2486)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
@@ -22,7 +22,8 @@ class Base62UtilTest {
|
||||
/**
|
||||
* Convert Base10 numbers to Base62 ASCII strings.
|
||||
*/
|
||||
@Test void fromBase10() {
|
||||
@Test
|
||||
void fromBase10() {
|
||||
assertThat(Base62Util.fromBase10(0L)).isEqualTo("0");
|
||||
assertThat(Base62Util.fromBase10(11L)).isEqualTo("B");
|
||||
assertThat(Base62Util.fromBase10(36L)).isEqualTo("a");
|
||||
@@ -32,7 +33,8 @@ class Base62UtilTest {
|
||||
/**
|
||||
* Convert Base62 ASCII strings to Base10 numbers.
|
||||
*/
|
||||
@Test void toBase10() {
|
||||
@Test
|
||||
void toBase10() {
|
||||
assertThat(Base62Util.toBase10("0")).isZero();
|
||||
assertThat(Base62Util.toBase10("B")).isEqualTo(11);
|
||||
assertThat(Base62Util.toBase10("a")).isEqualTo(36L);
|
||||
|
||||
@@ -62,7 +62,8 @@ class PropertyBasedArtifactUrlHandlerTest {
|
||||
/**
|
||||
* Tests the generation of http download url.
|
||||
*/
|
||||
@Test void urlGenerationWithDefaultConfiguration() {
|
||||
@Test
|
||||
void urlGenerationWithDefaultConfiguration() {
|
||||
properties.getProtocols().put("download-http", new UrlProtocol());
|
||||
|
||||
final List<ArtifactUrl> ddiUrls = urlHandlerUnderTest.getUrls(placeHolder, ApiType.DDI);
|
||||
@@ -77,7 +78,8 @@ class PropertyBasedArtifactUrlHandlerTest {
|
||||
/**
|
||||
* Tests the generation of custom download url with a CoAP example that supports DMF only.
|
||||
*/
|
||||
@Test void urlGenerationWithCustomConfiguration() {
|
||||
@Test
|
||||
void urlGenerationWithCustomConfiguration() {
|
||||
final UrlProtocol proto = new UrlProtocol();
|
||||
proto.setIp("127.0.0.1");
|
||||
proto.setPort(5683);
|
||||
@@ -97,7 +99,8 @@ class PropertyBasedArtifactUrlHandlerTest {
|
||||
/**
|
||||
* Tests the generation of custom download url using Base62 references with a CoAP example that supports DMF only.
|
||||
*/
|
||||
@Test void urlGenerationWithCustomShortConfiguration() {
|
||||
@Test
|
||||
void urlGenerationWithCustomShortConfiguration() {
|
||||
final UrlProtocol proto = new UrlProtocol();
|
||||
proto.setIp("127.0.0.1");
|
||||
proto.setPort(5683);
|
||||
@@ -117,7 +120,8 @@ class PropertyBasedArtifactUrlHandlerTest {
|
||||
/**
|
||||
* Verifies that the full qualified host of the statically defined hostname is replaced with the host of the request.
|
||||
*/
|
||||
@Test void urlGenerationWithHostFromRequest() throws URISyntaxException {
|
||||
@Test
|
||||
void urlGenerationWithHostFromRequest() throws URISyntaxException {
|
||||
final String testHost = "ddi.host.com";
|
||||
|
||||
final UrlProtocol proto = new UrlProtocol();
|
||||
@@ -138,7 +142,8 @@ class PropertyBasedArtifactUrlHandlerTest {
|
||||
/**
|
||||
* Verifies that the protocol of the statically defined hostname is replaced with the protocol of the request.
|
||||
*/
|
||||
@Test void urlGenerationWithProtocolFromRequest() throws URISyntaxException {
|
||||
@Test
|
||||
void urlGenerationWithProtocolFromRequest() throws URISyntaxException {
|
||||
final String testHost = "ddi.host.com";
|
||||
|
||||
final UrlProtocol proto = new UrlProtocol();
|
||||
@@ -154,7 +159,8 @@ class PropertyBasedArtifactUrlHandlerTest {
|
||||
/**
|
||||
* Verifies that the port of the statically defined hostname is replaced with the port of the request.
|
||||
*/
|
||||
@Test void urlGenerationWithPortFromRequest() throws URISyntaxException {
|
||||
@Test
|
||||
void urlGenerationWithPortFromRequest() throws URISyntaxException {
|
||||
final UrlProtocol proto = new UrlProtocol();
|
||||
proto.setRef("{protocol}://{hostname}:{portRequest}/{tenant}/controller/v1/{controllerId}/softwaremodules/{softwareModuleId}/artifacts/{artifactFileName}");
|
||||
|
||||
@@ -176,7 +182,8 @@ class PropertyBasedArtifactUrlHandlerTest {
|
||||
/**
|
||||
* Verifies that if default protocol port in request is used then url is returned without port
|
||||
*/
|
||||
@Test void urlGenerationWithPortFromRequestForHttps() throws URISyntaxException {
|
||||
@Test
|
||||
void urlGenerationWithPortFromRequestForHttps() throws URISyntaxException {
|
||||
final String protocol = "https";
|
||||
final UrlProtocol proto = new UrlProtocol();
|
||||
proto.setRef("{protocolRequest}://{hostnameRequest}:{portRequest}/{tenant}/controller/v1/{controllerId}/softwaremodules/{softwareModuleId}/artifacts/{artifactFileName}");
|
||||
@@ -195,7 +202,8 @@ class PropertyBasedArtifactUrlHandlerTest {
|
||||
/**
|
||||
* Verifies that the domain of the statically defined hostname is replaced with the domain of the request.
|
||||
*/
|
||||
@Test void urlGenerationWithDomainFromRequest() throws URISyntaxException {
|
||||
@Test
|
||||
void urlGenerationWithDomainFromRequest() throws URISyntaxException {
|
||||
final UrlProtocol proto = new UrlProtocol();
|
||||
proto.setHostname("host.bumlux.net");
|
||||
proto.setRef("{protocol}://{domainRequest}/{tenant}/controller/v1/{controllerId}/softwaremodules/{softwareModuleId}/artifacts/{artifactFileName}");
|
||||
|
||||
@@ -30,7 +30,8 @@ class URLPlaceholderTest {
|
||||
/**
|
||||
* Same object should be equal
|
||||
*/
|
||||
@Test // Exception squid:S5785 - JUnit assertTrue/assertFalse should be simplified to the corresponding dedicated assertion
|
||||
@Test
|
||||
// Exception squid:S5785 - JUnit assertTrue/assertFalse should be simplified to the corresponding dedicated assertion
|
||||
// Need to test the equals method and need to bypass magic logic in utility classes
|
||||
@SuppressWarnings({ "squid:S5838" })
|
||||
void sameObjectShouldBeEqual() {
|
||||
@@ -41,7 +42,8 @@ class URLPlaceholderTest {
|
||||
/**
|
||||
* Different object should not be equal
|
||||
*/
|
||||
@Test @SuppressWarnings({ "squid:S5838" })
|
||||
@Test
|
||||
@SuppressWarnings({ "squid:S5838" })
|
||||
void differentObjectShouldNotBeEqual() {
|
||||
final URLPlaceholder.SoftwareData softwareData2 = new URLPlaceholder.SoftwareData(2L, "file.txt", 123L, "someHash123");
|
||||
final URLPlaceholder placeholder2 = new URLPlaceholder("SuperCorp", 123L, "Super-2", 2L, softwareData2);
|
||||
@@ -57,7 +59,8 @@ class URLPlaceholderTest {
|
||||
/**
|
||||
* Different objects with same properties should be equal
|
||||
*/
|
||||
@Test void differentObjectsWithSamePropertiesShouldBeEqual() {
|
||||
@Test
|
||||
void differentObjectsWithSamePropertiesShouldBeEqual() {
|
||||
final URLPlaceholder placeholderWithSameProperties = new URLPlaceholder(placeholder.getTenant(), placeholder.getTenantId(),
|
||||
placeholder.getControllerId(), placeholder.getTargetId(), softwareData);
|
||||
assertThat(placeholder).isEqualTo(placeholderWithSameProperties);
|
||||
@@ -67,7 +70,8 @@ class URLPlaceholderTest {
|
||||
/**
|
||||
* Should not equal null
|
||||
*/
|
||||
@Test // Exception squid:S5785 - JUnit assertTrue/assertFalse should be simplified to
|
||||
@Test
|
||||
// Exception squid:S5785 - JUnit assertTrue/assertFalse should be simplified to
|
||||
// the corresponding dedicated assertion
|
||||
// Need to test the equals method and need to bypass magic logic in utility
|
||||
// classes
|
||||
@@ -80,7 +84,8 @@ class URLPlaceholderTest {
|
||||
/**
|
||||
* HashCode should not change
|
||||
*/
|
||||
@Test void hashCodeShouldNotChange() {
|
||||
@Test
|
||||
void hashCodeShouldNotChange() {
|
||||
final URLPlaceholder placeholderWithSameProperties = new URLPlaceholder(placeholder.getTenant(), placeholder.getTenantId(),
|
||||
placeholder.getControllerId(), placeholder.getTargetId(), softwareData);
|
||||
assertThat(placeholder).hasSameHashCodeAs(placeholder).hasSameHashCodeAs(placeholderWithSameProperties);
|
||||
|
||||
Reference in New Issue
Block a user