示例#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());
 }