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:
thanhtri122002 2022-06-08 22:19:42 +07:00 committed by GitHub
parent 77e481336e
commit 45f3e5b6de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View 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));
}
}