1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.orekit.estimation.measurements.gnss;
18
19 import org.junit.jupiter.api.Assertions;
20 import org.junit.jupiter.api.Test;
21
22
23 public class IntegerLeastSquareComparatorTest {
24
25 @Test
26 public void testCompare() {
27
28
29 final IntegerLeastSquareComparator comparator = new IntegerLeastSquareComparator();
30
31
32 Assertions.assertEquals(-1, comparator.compare(new IntegerLeastSquareSolution(new long[0], 1.0), new IntegerLeastSquareSolution(new long[0], 2.0)));
33 Assertions.assertEquals(1, comparator.compare(new IntegerLeastSquareSolution(new long[0], 2.0), new IntegerLeastSquareSolution(new long[0], 1.0)));
34 Assertions.assertEquals(0, comparator.compare(new IntegerLeastSquareSolution(new long[0], 1.0), new IntegerLeastSquareSolution(new long[0], 1.0)));
35 Assertions.assertEquals(-1, comparator.compare(null, new IntegerLeastSquareSolution(new long[0], 1.0)));
36 Assertions.assertEquals(0, comparator.compare(null, null));
37 Assertions.assertEquals(1, comparator.compare(new IntegerLeastSquareSolution(new long[0], 1.0), null));
38
39 }
40
41 }