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.Assert;
20 import org.junit.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 Assert.assertEquals(-1, comparator.compare(new IntegerLeastSquareSolution(new long[0], 1.0), new IntegerLeastSquareSolution(new long[0], 2.0)));
33 Assert.assertEquals(1, comparator.compare(new IntegerLeastSquareSolution(new long[0], 2.0), new IntegerLeastSquareSolution(new long[0], 1.0)));
34 Assert.assertEquals(0, comparator.compare(new IntegerLeastSquareSolution(new long[0], 1.0), new IntegerLeastSquareSolution(new long[0], 1.0)));
35 Assert.assertEquals(-1, comparator.compare(null, new IntegerLeastSquareSolution(new long[0], 1.0)));
36 Assert.assertEquals(0, comparator.compare(null, null));
37 Assert.assertEquals(1, comparator.compare(new IntegerLeastSquareSolution(new long[0], 1.0), null));
38
39 }
40
41 }