-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTest.java
More file actions
74 lines (51 loc) · 1.61 KB
/
Test.java
File metadata and controls
74 lines (51 loc) · 1.61 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;
import java.lang.reflect.Array;
class TestClass {
// Проверка: Тестовый массив
int[] arrayOne={3,5,4,5,4,4,5,67,8,6,5,4,3,56,67};
int[] arrayTwo={5,5,4,7,5,67,8,6,56,4,3,46,67};
int[] arrayThree={4,67};
//2 задание
int[] array1={7,4,67}; //-
int[] array2={1,67,8,};//-
int[] array3={1,4};//+
// int[] checkedArrayToo={3,5,5,5,67,8,6,5,3,56,67};
private ArrayTestClass arrayTestClass;
@BeforeEach
public void init() {
arrayTestClass = new ArrayTestClass();
}
@Test
@Timeout(value = 100)
public void test1() {
Assertions.assertEquals("[3, 56, 67]", arrayTestClass.arrayAfterFour(arrayOne));
}
@Test
@Timeout(value = 100)
public void test2() {
Assertions.assertEquals("[3, 46, 67]", arrayTestClass.arrayAfterFour(arrayTwo));
}
@Test
@Timeout(value = 100)
public void test3() {
Assertions.assertEquals("[67]", arrayTestClass.arrayAfterFour(arrayThree));
}
@Test
public void test4(){
Assertions.assertTrue(arrayTestClass.arrayOneFour(array1));
// Assertions.assertArrayEquals();
}
@Test
public void test5(){
Assertions.assertTrue(arrayTestClass.arrayOneFour(array2));
// Assertions.assertArrayEquals();
}
@Test
public void test6(){
Assertions.assertTrue(arrayTestClass.arrayOneFour(array3));
// Assertions.assertArrayEquals();
}
}