BAEL-2184 test names
This commit is contained in:
parent
45da250fff
commit
7d64241f16
|
@ -39,7 +39,7 @@ public class FooUnitTest {
|
||||||
* Section 3. Using the ArrayList Constructor
|
* Section 3. Using the ArrayList Constructor
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testConstructor() {
|
public void whenUsingConstructor_thenVerifyShallowCopy() {
|
||||||
ArrayList<Foo> newList = new ArrayList<>(srcCollection);
|
ArrayList<Foo> newList = new ArrayList<>(srcCollection);
|
||||||
verifyShallowCopy(srcCollection, newList);
|
verifyShallowCopy(srcCollection, newList);
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ public class FooUnitTest {
|
||||||
* Section 4. Using the Streams API
|
* Section 4. Using the Streams API
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testStream() {
|
public void whenUsingStream_thenVerifyShallowCopy() {
|
||||||
ArrayList<Foo> newList = srcCollection.stream().collect(toCollection(ArrayList::new));
|
ArrayList<Foo> newList = srcCollection.stream().collect(toCollection(ArrayList::new));
|
||||||
verifyShallowCopy(srcCollection, newList);
|
verifyShallowCopy(srcCollection, newList);
|
||||||
}
|
}
|
||||||
|
@ -57,7 +57,7 @@ public class FooUnitTest {
|
||||||
* Section 5. Deep Copy
|
* Section 5. Deep Copy
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testStreamDeepCopy() {
|
public void whenUsingDeepCopy_thenVerifyDeepCopy() {
|
||||||
ArrayList<Foo> newList = srcCollection.stream()
|
ArrayList<Foo> newList = srcCollection.stream()
|
||||||
.map(foo -> foo.deepCopy())
|
.map(foo -> foo.deepCopy())
|
||||||
.collect(toCollection(ArrayList::new));
|
.collect(toCollection(ArrayList::new));
|
||||||
|
@ -68,7 +68,7 @@ public class FooUnitTest {
|
||||||
* Section 6. Controlling the List Order
|
* Section 6. Controlling the List Order
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testSortOrder() {
|
public void whenUsingSortedStream_thenVerifySortOrder() {
|
||||||
assertFalse("Oops: source collection is already sorted!", isSorted(srcCollection));
|
assertFalse("Oops: source collection is already sorted!", isSorted(srcCollection));
|
||||||
ArrayList<Foo> newList = srcCollection.stream()
|
ArrayList<Foo> newList = srcCollection.stream()
|
||||||
.map(foo -> foo.deepCopy())
|
.map(foo -> foo.deepCopy())
|
||||||
|
|
Loading…
Reference in New Issue