Skip to content

Commit 0094f12

Browse files
committed
Added linebreaks to tests section of contributing doc
1 parent e07c0d6 commit 0094f12

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

CONTRIBUTING.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -112,23 +112,23 @@ However, *DO NOT* be afraid to say, "that looks terrible", and tweak it until it
112112

113113
#### Tests
114114

115-
1. Assume the following when creating and naming your test:
116-
a. Someone will come in cold to the entire project.
115+
1. Assume the following when creating and naming your test:<br>
116+
a. Someone will come in cold to the entire project.<br>
117117
b. The tests will be used by API users to guide their client application designs
118-
3. For repeated tests with different, but very similar data, ParameterizedTests are preferred.
118+
3. For repeated tests with different, but very similar data, ParameterizedTests are preferred.<br>
119119
4. In integration tests for data that should be cleaned up after all tests register them with the functions available in the base class. Create if reasonable.
120120
5. If it adds clarity, do not be afraid to use the `@Order` annotation to sequence tests. (See the [ApiKey Controller Test](https://github.com/USACE/cwms-data-api/blob/develop/cwms-data-api/src/test/java/cwms/cda/api/auth/ApiKeyControllerTestIT.java) for an example)
121121
6. Prefer disabling test by database schema version, if that does work use `EnabledIfProperty` and share a property name between related tests.
122122
7. Use "real" names for data in test data set. Either use actual real location/project/basin/etc names, or make up something that feels like one.
123123
a. NOTE: within reason. Location names, absolutely, but otherwise make sure the purpose of the name is clear.
124124
8. Name files consistent with the purpose of the test.
125-
9. Narrative tests: Test method names should be a narrative summary of the test. For example, `test_stream_create_then_update_then_delete_success(...)`.
125+
9. Narrative tests: Test method names should be a narrative summary of the test. For example, `test_stream_create_then_update_then_delete_success(...)`. <br>
126126
a. Use underscores to make the narrative structure of the test name clear.
127-
a. The method name should be a clear summary of what is being tested (create, get, update, delete) in order of operations.
128-
b. It should also include the expected result (success, error code, etc.)
129-
c. Comments should also be used in narrative flow to clarify the details of the test internally, but not as a substitute for a clear method name.
130-
d. Setup and tear down methods should also be clearly labelled as such. Setup/teardown methods should call into well-named helper methods to clarify the purpose of the setup/teardown steps.
131-
(example: setup method calls helper method `create_test_location()` followed by `create_test_time_series()` to clarify the purpose of the setup step)
127+
b. The method name should be a clear summary of what is being tested (create, get, update, delete) in order of operations.<br>
128+
c. It should also include the expected result (success, error code, etc.)<br>
129+
d. Comments should also be used in narrative flow to clarify the details of the test internally, but not as a substitute for a clear method name.<br>
130+
e. Setup and tear down methods should also be clearly labelled as such. Setup/teardown methods should call into well-named helper methods to clarify the purpose of the setup/teardown steps.<br>
131+
(example: setup method calls helper method `create_test_location()` followed by `create_test_time_series()` to clarify the purpose of the setup step)<br>
132132

133133

134134

0 commit comments

Comments
 (0)