-
Notifications
You must be signed in to change notification settings - Fork 54k
Bael 7230 modify properties #18519
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
Bael 7230 modify properties #18519
Conversation
* small refactoring on all changes
70bc93b to
b2060dd
Compare
| <version>2.11.0</version> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>commons-beanutils</groupId> | ||
| <artifactId>commons-beanutils</artifactId> | ||
| <version>1.10.1</version> |
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.
Let's use properties for all version numbers as per guidelines
| 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 { |
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.
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...
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.
thanks @KevinGilmore
i'm always carried away and use uncle bob's rule of test method name first 😬
|
retest this please (force jenkins rebuild) |
No description provided.