Amend the test method names to include a when and remove unused throws
This commit is contained in:
parent
4f7cb84630
commit
dfd8b0c4cc
|
@ -9,10 +9,9 @@ import java.util.Random;
|
|||
public class RandomListElementTest {
|
||||
|
||||
@Test
|
||||
public void givenList_shouldReturnARandomElement1() throws Exception {
|
||||
public void givenList_whenRandomNumberChosen_shouldReturnARandomElement() {
|
||||
List<Integer> givenList = Arrays.asList(1, 2, 3);
|
||||
Random rand = new Random();
|
||||
|
||||
Integer result = givenList.get(rand.nextInt(givenList.size()));
|
||||
givenList.get(rand.nextInt(givenList.size()));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue