@Test public void testToMap() { ContextTransformer transformer = createStrictMock(ContextTransformer.class); expect(transformer.getKey()).andReturn("data").times(1); replayAll(); EqualsPredicate predicate = new EqualsPredicate(transformer, "value"); Map<String, Object> actualMap = predicate.toMap(); verifyAll(); Map<String, Object> expectedMap = new HashMap<String, Object>(); expectedMap.put("equals", new ArrayList<String>(Arrays.asList("data", "value"))); Assert.assertEquals(expectedMap, actualMap); }
@Override public Map<String, Object> toMap() { return Collections.<String, Object>singletonMap(NAME, new ArrayList<String>(Arrays.asList(getContextKey(), delegate.getValue().toString()))); }
EqualsPredicate extends OperationPredicate { @Override public Map<String, Object> toMap() { return Collections.<String, Object>singletonMap(NAME, new ArrayList<String>(Arrays.asList(getContextKey(), delegate.getValue().toString()))); } }
EqualsPredicate extends OperationPredicate { @Override public Map<String, Object> toMap() { return Collections.<String, Object>singletonMap(NAME, new ArrayList<String>(Arrays.asList(getContextKey(), delegate.getValue().toString()))); } EqualsPredicate(ContextTransformer transformer, String value); }
EqualsPredicate extends OperationPredicate { @Override public Map<String, Object> toMap() { return Collections.<String, Object>singletonMap(NAME, new ArrayList<String>(Arrays.asList(getContextKey(), delegate.getValue().toString()))); } EqualsPredicate(ContextTransformer transformer, String value); static EqualsPredicate fromMap(Map<String, Object> map); String getValue(); @Override Map<String, Object> toMap(); @Override boolean evaluateTransformedData(Object data); }
EqualsPredicate extends OperationPredicate { @Override public Map<String, Object> toMap() { return Collections.<String, Object>singletonMap(NAME, new ArrayList<String>(Arrays.asList(getContextKey(), delegate.getValue().toString()))); } EqualsPredicate(ContextTransformer transformer, String value); static EqualsPredicate fromMap(Map<String, Object> map); String getValue(); @Override Map<String, Object> toMap(); @Override boolean evaluateTransformedData(Object data); static final String NAME; }