@Test public void testExecute_Sort_Dupes() { MultivaluedMap<String, String> params = new MultivaluedHashMap<>(); params.putSingle("sort", "[{\"property\":\"a\",\"direction\":\"DESC\"},{\"property\":\"a\",\"direction\":\"ASC\"}]"); SelectContext<Tr> context = prepareContext(Tr.class, params); stage.execute(context); assertNotNull(context.getMergedRequest()); assertNotNull(context.getMergedRequest().getOrderings()); assertEquals(2, context.getMergedRequest().getOrderings().size()); Sort o1 = context.getMergedRequest().getOrderings().get(0); Sort o2 = context.getMergedRequest().getOrderings().get(1); assertEquals("a", o1.getProperty()); assertEquals(Dir.DESC, o1.getDirection()); assertEquals("a", o2.getProperty()); assertEquals(Dir.ASC, o2.getDirection()); }
@Override public ProcessorOutcome execute(SelectContext<?> context) { doExecute(context); return ProcessorOutcome.CONTINUE; }
ParseRequestStage implements Processor<SelectContext<?>> { @Override public ProcessorOutcome execute(SelectContext<?> context) { doExecute(context); return ProcessorOutcome.CONTINUE; } }
ParseRequestStage implements Processor<SelectContext<?>> { @Override public ProcessorOutcome execute(SelectContext<?> context) { doExecute(context); return ProcessorOutcome.CONTINUE; } ParseRequestStage(@Inject IAgRequestBuilderFactory requestBuilderFactory); }
ParseRequestStage implements Processor<SelectContext<?>> { @Override public ProcessorOutcome execute(SelectContext<?> context) { doExecute(context); return ProcessorOutcome.CONTINUE; } ParseRequestStage(@Inject IAgRequestBuilderFactory requestBuilderFactory); @Override ProcessorOutcome execute(SelectContext<?> context); }
ParseRequestStage implements Processor<SelectContext<?>> { @Override public ProcessorOutcome execute(SelectContext<?> context) { doExecute(context); return ProcessorOutcome.CONTINUE; } ParseRequestStage(@Inject IAgRequestBuilderFactory requestBuilderFactory); @Override ProcessorOutcome execute(SelectContext<?> context);  }