Package org.eurekastreams.server.action.request.gallery

Examples of org.eurekastreams.server.action.request.gallery.CompressGadgetZoneRequest


    public void testExecute()
    {
        DeleteGadgetDefinitionExecution sut = new DeleteGadgetDefinitionExecution(deleteGadgetDefinitionMapper,
                tabListMapper, ACTION);
        final Collection<CompressGadgetZoneRequest> tabs = new ArrayList<CompressGadgetZoneRequest>();
        CompressGadgetZoneRequest rqst1 = new CompressGadgetZoneRequest(4L, 8, 5L);
        tabs.add(rqst1);
        CompressGadgetZoneRequest rqst2 = new CompressGadgetZoneRequest(6L, 9, 7L);
        tabs.add(rqst2);

        context.checking(new Expectations()
        {
            {
View Full Code Here


     * Tests execute.
     */
    @Test
    public void testExecuteNoOwner()
    {
        final CompressGadgetZoneRequest request = new CompressGadgetZoneRequest(8L, 9, null);
        context.checking(new Expectations()
        {
            {
                allowing(gadgetMapper).execute(request);
                will(returnValue(Arrays.asList(gadget1, gadget2, gadget3)));
View Full Code Here

     * Tests execute.
     */
    @Test
    public void testExecuteWithOwner()
    {
        final CompressGadgetZoneRequest request = new CompressGadgetZoneRequest(8L, 9, 4L);
        context.checking(new Expectations()
        {
            {
                allowing(gadgetMapper).execute(request);
                will(returnValue(Arrays.asList(gadget1, gadget2, gadget3)));
View Full Code Here

     */
    @Test
    public void testExecute()
    {
        final long templateId = 3253L;
        CompressGadgetZoneRequest request = new CompressGadgetZoneRequest(templateId, 2, null);
        List<Gadget> results = sut.execute(request);

        assertEquals(3, results.size());

        final long id1 = 3759L;
View Full Code Here

     * @return Nothing.
     */
    @Override
    public Serializable execute(final TaskHandlerActionContext<ActionContext> inActionContext)
    {
        CompressGadgetZoneRequest request = (CompressGadgetZoneRequest) inActionContext.getActionContext().getParams();

        // get the gadgets and update the order
        List<Gadget> gadgets = gadgetMapper.execute(request);
        int count = gadgets.size();
        for (int i = 0; i < count; i++)
        {
            gadgets.get(i).setZoneIndex(i);
        }

        // reload cache
        if (request.getTabTemplateOwnerId() != null)
        {
            pageMapper.execute(request.getTabTemplateOwnerId());
        }

        return null;
    }
View Full Code Here

        final long person3 = 98L;

        Collection<CompressGadgetZoneRequest> list = sut.execute(id);

        assertEquals(3, list.size());
        CompressGadgetZoneRequest expected = new CompressGadgetZoneRequest(template1, 0, person1);
        assertTrue(Matchers.hasItem(equalInternally(expected)).matches(list));
        expected = new CompressGadgetZoneRequest(template2, 0, person2);
        assertTrue(Matchers.hasItem(equalInternally(expected)).matches(list));
        expected = new CompressGadgetZoneRequest(template3, 0, person3);
        assertTrue(Matchers.hasItem(equalInternally(expected)).matches(list));
    }
View Full Code Here

TOP

Related Classes of org.eurekastreams.server.action.request.gallery.CompressGadgetZoneRequest

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.