@Test public void testArrayCardinalityMany() throws IOException { Map<String, Object> input = new HashMap<String, Object>() {{ put("input", new Integer[]{5, 4}); }}; Map<String, Object> spec = new HashMap<String, Object>() {{ put("input", "MANY"); }}; Map<String, Object> expected = new HashMap<String, Object>() {{ put("input", new Integer[]{5, 4}); }}; CardinalityTransform cardinalityTransform = new CardinalityTransform(spec); Object actual = cardinalityTransform.transform(input); JoltTestUtil.runDiffy("failed array test", expected, actual); }
@Override public Object transform( Object input ) { rootSpec.apply( ROOT_KEY, Optional.of( input ), new WalkedPath(), null, null ); return input; }
CardinalityTransform implements SpecDriven, Transform { @Override public Object transform( Object input ) { rootSpec.apply( ROOT_KEY, Optional.of( input ), new WalkedPath(), null, null ); return input; } }
CardinalityTransform implements SpecDriven, Transform { @Override public Object transform( Object input ) { rootSpec.apply( ROOT_KEY, Optional.of( input ), new WalkedPath(), null, null ); return input; } @Inject  CardinalityTransform( Object spec ); }
CardinalityTransform implements SpecDriven, Transform { @Override public Object transform( Object input ) { rootSpec.apply( ROOT_KEY, Optional.of( input ), new WalkedPath(), null, null ); return input; } @Inject  CardinalityTransform( Object spec ); @Override Object transform( Object input ); }
CardinalityTransform implements SpecDriven, Transform { @Override public Object transform( Object input ) { rootSpec.apply( ROOT_KEY, Optional.of( input ), new WalkedPath(), null, null ); return input; } @Inject  CardinalityTransform( Object spec ); @Override Object transform( Object input );  }