clean code refactorings

- add description to assertions in unit tests
- make inner classes static
- remove out-commented code

Signed-off-by: Michael Hirsch <michael.hirsch@bosch-si.com>
This commit is contained in:
Michael Hirsch
2016-02-25 14:38:25 +01:00
parent ca66932918
commit f969d6f4c2
10 changed files with 99 additions and 122 deletions

View File

@@ -32,10 +32,15 @@ public class ExceptionInfoTest {
underTest.setMessage(knownMessage);
underTest.setParameters(knownParameters);
assertThat(underTest.getErrorCode()).isEqualTo(knownErrorCode);
assertThat(underTest.getExceptionClass()).isEqualTo(knownExceptionClass);
assertThat(underTest.getMessage()).isEqualTo(knownMessage);
assertThat(underTest.getParameters()).isEqualTo(knownParameters);
assertThat(underTest.getErrorCode()).as("The error code should match with the known error code in the test")
.isEqualTo(knownErrorCode);
assertThat(underTest.getExceptionClass())
.as("The exception class should match with the known error code in the test")
.isEqualTo(knownExceptionClass);
assertThat(underTest.getMessage()).as("The message should match with the known error code in the test")
.isEqualTo(knownMessage);
assertThat(underTest.getParameters()).as("The parameters should match with the known error code in the test")
.isEqualTo(knownParameters);
}
}