Add a test for average (#3084)
Co-authored-by: thanhtri122002 <thanhnt122002@122002> Co-authored-by: Andrii Siriak <siryaka@gmail.com>
This commit is contained in:
parent
77e481336e
commit
45f3e5b6de
14
src/test/java/com/thealgorithms/maths/AverageTest.java
Normal file
14
src/test/java/com/thealgorithms/maths/AverageTest.java
Normal file
@ -0,0 +1,14 @@
|
||||
package com.thealgorithms.maths;
|
||||
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
||||
public class AverageTest {
|
||||
double [] numbers = {3, 6, 9, 12, 15, 18, 21};
|
||||
@Test
|
||||
public void testAverage() {
|
||||
|
||||
Assertions.assertEquals(12, Average.average(numbers));
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user