Sha256: 52c941d3fc27148beeec4022e442605dd41a8af76b111a25ab592c84ece8cb7c
Contents?: true
Size: 1.83 KB
Versions: 11
Compression:
Stored size: 1.83 KB
Contents
package com.xnlogic.pacer.pipes; import static org.junit.Assert.*; import org.junit.Test; import java.util.Collection; import java.util.Arrays; import com.xnlogic.pacer.pipes.IsUniquePipe; public class IsUniquePipeTest { @Test public void allUniqueTest() { Collection<String> collection = Arrays.asList("These", "are", "all", "unique"); IsUniquePipe<String> isUniquePipe = new IsUniquePipe<String>(); isUniquePipe.setStarts(collection); String s = isUniquePipe.next(); assertTrue(s.equals("These")); assertTrue(isUniquePipe.isUnique()); s = isUniquePipe.next(); assertTrue(s.equals("are")); assertTrue(isUniquePipe.isUnique()); s = isUniquePipe.next(); assertTrue(s.equals("all")); assertTrue(isUniquePipe.isUnique()); s = isUniquePipe.next(); assertTrue(s.equals("unique")); assertTrue(isUniquePipe.isUnique()); } @Test public void notAllUniqueTest() { Collection<String> collection = Arrays.asList("Not", "all", "all", "all", "unique"); IsUniquePipe<String> isUniquePipe = new IsUniquePipe<String>(); isUniquePipe.setStarts(collection); String s = isUniquePipe.next(); assertTrue(s.equals("Not")); assertTrue(isUniquePipe.isUnique()); s = isUniquePipe.next(); assertTrue(s.equals("all")); assertTrue(isUniquePipe.isUnique()); s = isUniquePipe.next(); assertTrue(s.equals("all")); assertFalse(isUniquePipe.isUnique()); s = isUniquePipe.next(); assertTrue(s.equals("all")); assertFalse(isUniquePipe.isUnique()); s = isUniquePipe.next(); assertTrue(s.equals("unique")); assertFalse(isUniquePipe.isUnique()); } }
Version data entries
11 entries across 11 versions & 1 rubygems