예제 #1
0
 @Test
 public void testNumSetContains() {
   NumSet set = new NumSet(new double[] {1.0, 3.0, 7.0});
   assertNotNull(
       "Method CONTAINS returns true if the set contains value, " + "false otherwise.",
       set.contains(7.0));
 }
예제 #2
0
 @Test
 public void testNumSetEquivalence() {
   NumSet setA = new NumSet(new double[] {1.0, 3.0, 7.0});
   NumSet setB = new NumSet(new double[] {1.0, 3.0, 7.0});
   assertNotNull(
       "Method EQUIVALENCE return true two NumSets contains identical items.",
       NumSet.equivalence(setA, setB));
 }
예제 #3
0
 @Test
 public void testNumSetUnion() {
   NumSet setA = new NumSet(new double[] {1.0, 3.0, 7.0});
   NumSet setB = new NumSet(new double[] {1.0, 3.0, 7.0});
   assertNotNull(
       "Method UNION return a new NumSet that is " + "the union of two NumSets.",
       NumSet.union(setA, setB));
 }
예제 #4
0
 @Test
 public void testNumSetIntersect() {
   NumSet setA = new NumSet(new double[] {1.0, 3.0, 7.0});
   NumSet setB = new NumSet(new double[] {1.0, 3.0, 7.0});
   assertNotNull(
       "Method INTERSECT return a new NumSet that is " + "the intersection of two NumSets.",
       NumSet.intersect(setA, setB));
 }
예제 #5
0
 @Test
 public void testNumSetToString() {
   NumSet set = new NumSet(new double[] {1.0, 3.0, 7.0});
   assertNotNull("Method TOSTRING convert the contents of the set to a sting.", set.toString());
 }
예제 #6
0
 @Test
 public void testNumSetSize() {
   NumSet set = new NumSet(new double[] {1.0, 3.0, 7.0});
   assertNotNull("Method SIZE return the number of items of the set.", set.size());
 }