Package org.apache.sling.api.wrappers

Examples of org.apache.sling.api.wrappers.ValueMapDecorator


        preparePortrait();

        map.put("width", 300);
        map.put("height", 200);

        ValueMap properties = new ValueMapDecorator(map);

        transformer.transform(layer, properties);

        verify(layer, times(1)).resize(131, 200);
    }
View Full Code Here


        preparePortrait();

        map.put("width", 200);
        map.put("height", 300);

        ValueMap properties = new ValueMapDecorator(map);

        transformer.transform(layer, properties);

        verify(layer, times(1)).resize(197, 300);
    }
View Full Code Here

        prepareSquare();

        map.put("width", 200);
        map.put("height", 300);

        ValueMap properties = new ValueMapDecorator(map);

        transformer.transform(layer, properties);

        verify(layer, times(1)).resize(200, 200);
    }
View Full Code Here

        prepareSquare();

        map.put("width", 300);
        map.put("height", 200);

        ValueMap properties = new ValueMapDecorator(map);

        transformer.transform(layer, properties);

        verify(layer, times(1)).resize(200, 200);
    }
View Full Code Here

    public void testTransform() throws Exception {
        Rectangle expected = new Rectangle();
        expected.setBounds(0, 0, 100, 200);

        map.put("bounds", "0,0,100,200");
        ValueMap properties = new ValueMapDecorator(map);

        transformer.transform(layer, properties);

        verify(layer, times(1)).crop(expected);
    }
View Full Code Here

        // 1600 x 900
        Rectangle expected = new Rectangle();
        expected.setBounds(0, 0, 1600, 400);

        map.put("bounds", "0,0,2000,500");
        ValueMap properties = new ValueMapDecorator(map);

        transformer.transform(layer, properties);

        verify(layer, times(1)).crop(expected);
    }
View Full Code Here

        prepareSquare();

        map.put("width", 800);
        map.put("height", 600);

        ValueMap properties = new ValueMapDecorator(map);

        transformer.transform(layer, properties);

        verify(layer, times(0)).resize(anyInt(), anyInt());
    }
View Full Code Here

        // 1600 x 900
        Rectangle expected = new Rectangle();
        expected.setBounds(0, 0, 400, 900);

        map.put("bounds", "0,0,800,1800");
        ValueMap properties = new ValueMapDecorator(map);

        transformer.transform(layer, properties);

        verify(layer, times(1)).crop(expected);
    }
View Full Code Here

        // 1600 x 900
        Rectangle expected = new Rectangle();
        expected.setBounds(0, 0, 1600, 400);

        map.put("bounds", "0,0,20000,5000");
        ValueMap properties = new ValueMapDecorator(map);

        transformer.transform(layer, properties);

        verify(layer, times(1)).crop(expected);
    }
View Full Code Here

        map.put("width", 800);
        map.put("height", 600);
        map.put("upscale", true);

        ValueMap properties = new ValueMapDecorator(map);

        transformer.transform(layer, properties);

        verify(layer, times(1)).resize(600, 600);
    }
View Full Code Here

TOP

Related Classes of org.apache.sling.api.wrappers.ValueMapDecorator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.