-
Notifications
You must be signed in to change notification settings - Fork 54.2k
Bael 8585 #18643
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Bael 8585 #18643
Conversation
: updated pom Signed-off-by: Emmanuel Mireku Omari <[email protected]>
Signed-off-by: Emmanuel Mireku Omari <[email protected]>
Signed-off-by: Emmanuel Mireku Omari <[email protected]>
Signed-off-by: Emmanuel Mireku Omari <[email protected]>
Signed-off-by: Emmanuel Mireku Omari <[email protected]>
<dependency> | ||
<groupId>org.projectlombok</groupId> | ||
<artifactId>lombok</artifactId> | ||
<version>1.18.32</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.assertj</groupId> | ||
<artifactId>assertj-core</artifactId> | ||
<version>3.24.2</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.glassfish.expressly</groupId> | ||
<artifactId>expressly</artifactId> | ||
<version>5.0.0</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-databind</artifactId> | ||
<version>2.18.2</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.jayway.jsonpath</groupId> | ||
<artifactId>json-path</artifactId> | ||
<version>2.8.0</version> | ||
<scope>test</scope> | ||
</dependency> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have a convention to extract properties for version numbers. Also check if any of these versions are already specified in the parent pom (e.g. AssertJ might be, we use it in lots of articles)
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
|
||
@Data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have a convention to avoid using Lombok except on articles that explicitly cover it - please remove the Lombok dependency for that reason and use plain Java for this
} | ||
|
||
@Test | ||
void whenPasswordIsValid_thenNoViolations() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Across all the unit tests there is the same minor BDD naming convention issue.
BDD syntax has 3 parts:
- given (the preconditions about the test scenario)
- when (the action under test)
- then (the expected outcome)
In this example, instead of whenPasswordIsValid_thenNoViolations
the convention is supposed to be givenPasswordIsValid_whenValidate_thenNoViolations
private ObjectMapper objectMapper; | ||
|
||
@BeforeEach | ||
void setup() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
void setup() { | |
void setUp() { |
No description provided.