这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@bpstelios10
Copy link
Contributor

No description provided.

@bpstelios10 bpstelios10 force-pushed the BAEL-7230-modify-properties branch from 70bc93b to b2060dd Compare April 29, 2025 20:35
Comment on lines 21 to 26
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.10.1</version>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use properties for all version numbers as per guidelines

Comment on lines 36 to 47
public void addProperty_whenApacheCommonsIsUsed_thenReturnsNewPropertyWithoutAffectingOtherProperties() throws ConfigurationException {
assertNull(propertyMutator.getProperty("new.property"));
assertEquals("TestApp", propertyMutator.getProperty("name"));

propertyMutator.addProperty("new.property", "new-value");

assertEquals("new-value", propertyMutator.getProperty("new.property"));
assertEquals("TestApp", propertyMutator.getProperty("name"));
}

@Test
public void updateProperty_whenApacheCommonsIsUsed_thenReturnsUpdatedPropertyWithoutAffectingOtherProperties() throws ConfigurationException {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this file and the other unit test files, let's stick to the [givenX_]whenY_thenZ pattern rather than prefixing the test names. Here are a couple of example naming conventions you might use, given the first test as an example:

  • whenAddPropertyUsingApacheCommons_then...
  • givenApacheCommons_thenAddProperty_then...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @KevinGilmore
i'm always carried away and use uncle bob's rule of test method name first 😬

@eric-martin
Copy link
Collaborator

retest this please (force jenkins rebuild)

@eric-martin eric-martin merged commit b7b448a into eugenp:master May 13, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants