use of java.util.AbstractMap.SimpleImmutableEntry in project jmeter by apache.
the class ObjectTableSorterTest method fixLastRowWithDescendingValue.
@Test
public void fixLastRowWithDescendingValue() {
sorter.fixLastRow().setSortKey(new SortKey(1, SortOrder.DESCENDING));
List<SimpleImmutableEntry<String, Integer>> expected = asList(d4(), a3(), b2(), c1());
assertRowOrderAndIndexes(expected);
}
use of java.util.AbstractMap.SimpleImmutableEntry in project jmeter by apache.
the class ObjectTableSorterTest method sortKeyDescending.
@Test
public void sortKeyDescending() {
sorter.setSortKey(new SortKey(0, SortOrder.DESCENDING));
List<SimpleImmutableEntry<String, Integer>> expected = asList(d4(), c1(), b2(), a3());
assertRowOrderAndIndexes(expected);
}
use of java.util.AbstractMap.SimpleImmutableEntry in project jmeter by apache.
the class ObjectTableSorterTest method sortValueDescending.
@Test
public void sortValueDescending() {
sorter.setSortKey(new SortKey(1, SortOrder.DESCENDING));
List<SimpleImmutableEntry<String, Integer>> expected = asList(d4(), a3(), b2(), c1());
assertRowOrderAndIndexes(expected);
}
use of java.util.AbstractMap.SimpleImmutableEntry in project jmeter by apache.
the class ObjectTableSorterTest method sortValueAscending.
@Test
public void sortValueAscending() {
sorter.setSortKey(new SortKey(1, SortOrder.ASCENDING));
List<SimpleImmutableEntry<String, Integer>> expected = asList(c1(), b2(), a3(), d4());
assertRowOrderAndIndexes(expected);
}
use of java.util.AbstractMap.SimpleImmutableEntry in project streamsx.topology by IBMStreams.
the class CollectionTupleTest method _testMap.
private static TStream<String> _testMap() throws Exception {
final Topology topology = newTopology();
List<Map<String, Integer>> tuples = new ArrayList<>();
Map<String, Integer> map = new TreeMap<>();
map.put("A", 8);
map.put("B", 32);
tuples.add(map);
map = new TreeMap<>();
map.put("C", 9);
map.put("D", 73);
map.put("E", 56);
tuples.add(map);
TStream<Map<String, Integer>> data = topology.constants(tuples);
TStream<SimpleImmutableEntry<String, Integer>> entries = CollectionStreams.flattenMap(data);
return StringStreams.toString(entries);
}
Aggregations