2020-04-20 19:36:51 +02:00
|
|
|
package com.baeldung.r;
|
|
|
|
|
|
|
|
import org.junit.Assert;
|
|
|
|
import org.junit.Ignore;
|
|
|
|
import org.junit.Test;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Test for {@link FastRMean}.
|
|
|
|
*
|
|
|
|
* @author Donato Rimenti
|
|
|
|
*/
|
|
|
|
@Ignore
|
|
|
|
public class FastRMeanUnitTest {
|
|
|
|
|
2020-04-24 16:51:50 +02:00
|
|
|
/**
|
|
|
|
* Object to test.
|
|
|
|
*/
|
|
|
|
private FastRMean fastrMean = new FastRMean();
|
2020-04-20 19:36:51 +02:00
|
|
|
|
2020-04-24 16:51:50 +02:00
|
|
|
/**
|
|
|
|
* Test for {@link FastRMeanUnitTest#mean(int[])}.
|
|
|
|
*/
|
|
|
|
@Test
|
|
|
|
public void givenValues_whenMean_thenCorrect() {
|
|
|
|
int[] input = { 1, 2, 3, 4, 5 };
|
|
|
|
double result = fastrMean.mean(input);
|
|
|
|
Assert.assertEquals(3.0, result, 0.000001);
|
|
|
|
}
|
2020-04-20 19:36:51 +02:00
|
|
|
}
|