Skip to content

Commit

Permalink
refact: move main to test
Browse files Browse the repository at this point in the history
  • Loading branch information
asmfstatoil committed Nov 2, 2023
1 parent 1e251e4 commit 0ad253b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,21 +159,4 @@ public void setSmoothedNumbers() {
public double[] getSmoothedNumbers() {
return smoothedNumbers;
}

/**
* <p>
* main.
* </p>
*
* @param args an array of {@link java.lang.String} objects
*/
public static void main(String[] args) {
double[] numbers = {10, 11, 12, 13, 14, 15, 15.5, 15, 19, 14, 14, 13, 12, 12, 11, 10, 9, 8};
DataSmoother test = new DataSmoother(numbers, 3, 3, 0, 4);
Matrix data = new Matrix(test.getSmoothedNumbers(), 1);
data.print(10, 2);
test.runSmoothing();
data = new Matrix(test.getSmoothedNumbers(), 1);
data.print(10, 2);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package neqsim.statistics.dataanalysis.datasmoothing;

import org.junit.jupiter.api.Test;
import Jama.Matrix;

public class DataSmootherTest {

@Test
void testgetSmoothedNumbers(String[] args) {
double[] numbers = {10, 11, 12, 13, 14, 15, 15.5, 15, 19, 14, 14, 13, 12, 12, 11, 10, 9, 8};
DataSmoother test = new DataSmoother(numbers, 3, 3, 0, 4);
Matrix data = new Matrix(test.getSmoothedNumbers(), 1);
data.print(10, 2);
test.runSmoothing();
data = new Matrix(test.getSmoothedNumbers(), 1);
data.print(10, 2);
}
}

0 comments on commit 0ad253b

Please sign in to comment.