Skip to content

Commit 7d64241

Browse files
author
clininger
committed
BAEL-2184 test names
1 parent 45da250 commit 7d64241

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

  • core-java-collections/src/test/java/com/baeldung/convertcollectiontoarraylist

core-java-collections/src/test/java/com/baeldung/convertcollectiontoarraylist/FooUnitTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public static void setUpClass() {
3939
* Section 3. Using the ArrayList Constructor
4040
*/
4141
@Test
42-
public void testConstructor() {
42+
public void whenUsingConstructor_thenVerifyShallowCopy() {
4343
ArrayList<Foo> newList = new ArrayList<>(srcCollection);
4444
verifyShallowCopy(srcCollection, newList);
4545
}
@@ -48,7 +48,7 @@ public void testConstructor() {
4848
* Section 4. Using the Streams API
4949
*/
5050
@Test
51-
public void testStream() {
51+
public void whenUsingStream_thenVerifyShallowCopy() {
5252
ArrayList<Foo> newList = srcCollection.stream().collect(toCollection(ArrayList::new));
5353
verifyShallowCopy(srcCollection, newList);
5454
}
@@ -57,7 +57,7 @@ public void testStream() {
5757
* Section 5. Deep Copy
5858
*/
5959
@Test
60-
public void testStreamDeepCopy() {
60+
public void whenUsingDeepCopy_thenVerifyDeepCopy() {
6161
ArrayList<Foo> newList = srcCollection.stream()
6262
.map(foo -> foo.deepCopy())
6363
.collect(toCollection(ArrayList::new));
@@ -68,7 +68,7 @@ public void testStreamDeepCopy() {
6868
* Section 6. Controlling the List Order
6969
*/
7070
@Test
71-
public void testSortOrder() {
71+
public void whenUsingSortedStream_thenVerifySortOrder() {
7272
assertFalse("Oops: source collection is already sorted!", isSorted(srcCollection));
7373
ArrayList<Foo> newList = srcCollection.stream()
7474
.map(foo -> foo.deepCopy())

0 commit comments

Comments
 (0)