Skip to content

Commit 45f3e5b

Browse files
thanhtri122002thanhtri122002siriak
authored
Add a test for average (TheAlgorithms#3084)
Co-authored-by: thanhtri122002 <thanhnt122002@122002> Co-authored-by: Andrii Siriak <siryaka@gmail.com>
1 parent 77e4813 commit 45f3e5b

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package com.thealgorithms.maths;
2+
3+
import org.junit.jupiter.api.Assertions;
4+
import org.junit.jupiter.api.Test;
5+
6+
7+
public class AverageTest {
8+
double [] numbers = {3, 6, 9, 12, 15, 18, 21};
9+
@Test
10+
public void testAverage() {
11+
12+
Assertions.assertEquals(12, Average.average(numbers));
13+
}
14+
}

0 commit comments

Comments
 (0)