-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExampleTest.java
More file actions
42 lines (31 loc) · 1.04 KB
/
Copy pathExampleTest.java
File metadata and controls
42 lines (31 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package com.example;
import org.junit.jupiter.api.Test;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import static org.junit.jupiter.api.Assertions.*;
class ExampleTest {
@Test
void testModifySmallList() {
List<String> inputList = new ArrayList<>(Collections.nCopies(63, "Initial"));
List<String> result = Example.modify(inputList);
assertNull(result);
}
@Test
void testModifyLargeList() {
List<String> inputList = new ArrayList<>(Collections.nCopies(65, "Initial"));
List<String> result = Example.modify(inputList);
assertNotNull(result);
assertEquals("Dieciséis", result.get(16));
//assertEquals("Treinta y dos", result.get(32));
assertEquals("Sesenta y cuatro", result.get(64));
}
/*
@Test
void testModifyEdgeCase() {
List<String> inputList = new ArrayList<>(Collections.nCopies(64, "Initial"));
List<String> result = Example.modify(inputList);
assertNull(result);
}
*/
}