Use spring-javaformat to format and check code

Resolves: #1450
This commit is contained in:
Vedran Pavic
2019-06-17 23:44:55 +02:00
parent 0eaeb98b0c
commit 822db7fbbf
241 changed files with 2961 additions and 4660 deletions

View File

@@ -45,7 +45,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
@ExtendWith(SpringExtension.class)
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
public class AttributeTests {
class AttributeTests {
private static final String DOCKER_IMAGE = "redis:5.0.5";
@@ -55,29 +55,29 @@ public class AttributeTests {
private WebDriver driver;
@BeforeEach
public void setup() {
void setup() {
this.driver = new HtmlUnitDriver();
}
@AfterEach
public void tearDown() {
void tearDown() {
this.driver.quit();
}
@Test
public void home() {
void home() {
HomePage home = HomePage.go(this.driver, this.port);
home.assertAt();
}
@Test
public void noAttributes() {
void noAttributes() {
HomePage home = HomePage.go(this.driver, this.port);
assertThat(home.attributes()).isEmpty();
}
@Test
public void createAttribute() {
void createAttribute() {
HomePage home = HomePage.go(this.driver, this.port);
// @formatter:off
home = home.form()
@@ -98,8 +98,7 @@ public class AttributeTests {
@Bean
public GenericContainer redisContainer() {
GenericContainer redisContainer = new GenericContainer(DOCKER_IMAGE)
.withExposedPorts(6379);
GenericContainer redisContainer = new GenericContainer(DOCKER_IMAGE).withExposedPorts(6379);
redisContainer.start();
return redisContainer;
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2017 the original author or authors.
* Copyright 2014-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -77,6 +77,7 @@ public class HomePage {
}
public class Form {
@FindBy(name = "attributeName")
WebElement attributeName;
@@ -104,9 +105,11 @@ public class HomePage {
this.submit.click();
return PageFactory.initElements(HomePage.this.driver, page);
}
}
public static class Attribute {
@FindBy(xpath = ".//td[1]")
WebElement attributeName;
@@ -130,6 +133,7 @@ public class HomePage {
public String getAttributeValue() {
return this.attributeValue.getText();
}
}
}