Package org.eurekastreams.server.domain

Examples of org.eurekastreams.server.domain.Tab


    @Test
    public void performActionsWithGoodParams() throws Exception
    {
        final long targetGadgetId = GADGET3_ID;
        final List<Gadget> gadgets = buildGadgets(targetGadgetId);
        final Tab tab = context.mock(Tab.class);

        context.checking(new Expectations()
        {
            {
                oneOf(tabMapper).findTabByGadgetId(GADGET3_ID);
View Full Code Here


    @Test
    public void performActionsDeleteOnlyGadgetInZone() throws Exception
    {
        final long targetGadgetId = GADGET1_ID;
        final List<Gadget> gadgets = buildGadgets(targetGadgetId);
        final Tab tab = context.mock(Tab.class);

        context.checking(new Expectations()
        {
            {
                oneOf(tabMapper).findTabByGadgetId(GADGET1_ID);
View Full Code Here

    @Test
    public void performActionsDeleteGadget() throws Exception
    {
        final long targetGadgetId = GADGET6_ID;
        final List<Gadget> gadgets = buildGadgets(targetGadgetId);
        final Tab tab = context.mock(Tab.class);

        context.checking(new Expectations()
        {
            {
                oneOf(tabMapper).findTabByGadgetId(GADGET6_ID);
View Full Code Here

    @Test(expected = ExecutionException.class)
    public void performActionWithInvalidGadgetId() throws Exception
    {
        final long targetGadgetId = NO_SUCH_GADGET_ID;
        final List<Gadget> gadgets = buildGadgets(targetGadgetId);
        final Tab tab = context.mock(Tab.class);

        context.checking(new Expectations()
        {
            {
                oneOf(tabMapper).findTabByGadgetId(NO_SUCH_GADGET_ID);
View Full Code Here

                allowing(deleteCacheKeysMapper).execute(with(any(Set.class)));
            }
        });

        Tab actual = null;
        try
        {
            actual = (Tab) sut.execute(actionContext);
        }
        catch (Exception e)
View Full Code Here

     * Prepare the system under test.
     */
    @Before
    public void setup()
    {
        delTab = new Tab("delete Tab", Layout.THREECOLUMN);
        sut = new DeleteTabExecution(tabGroupMapper, tabMapper, deleteCacheKeysMapper);
    }
View Full Code Here

                tabList.add(setupTab(TAB4_ID));
            }

            private Tab setupTab(final long index)
            {
                Tab tab = context.mock(Tab.class, "tab" + index);

                allowing(tab).getId();
                will(returnValue(index));

                return tab;
View Full Code Here

        TabGroup startTabGroup = new TabGroup();

        for (TabDTO tabDTO : dto.getTabDTOs())
        {
            Tab tab = new Tab(tabDTO.getTabName(), tabDTO.getTabLayout(), tabDTO.getId());
            tab.setTabIndex(tabDTO.getTabIndex());
            List<Gadget> gadgets = new ArrayList<Gadget>();

            for (GadgetDTO gadgetDTO : tabDTO.getGadgets())
            {
                GadgetDefinition gadgetDef = new GadgetDefinition(gadgetDTO.getGadgetDefinition().getUrl(), gadgetDTO
                        .getGadgetDefinition().getUuid());
                gadgetDef.setId(gadgetDTO.getGadgetDefinition().getId());
                Gadget gadget = new Gadget(gadgetDef, gadgetDTO.getZoneNumber(), gadgetDTO.getZoneIndex(), null,
                        gadgetDTO.getGadgetUserPref());
                gadget.setId(gadgetDTO.getId());
                gadget.setMaximized(gadgetDTO.isMaximized());
                gadget.setMinimized(gadgetDTO.isMinimized());
                gadgets.add(gadget);
            }

            tab.setGadgets(gadgets);
            startTabGroup.addTab(tab);
        }

        person.setStartTabGroup(startTabGroup);
View Full Code Here

     */
    @Test
    public void testConstructorNoCause()
    {
        String exMessage = "This statement is false.";
        Tab deletedTab = context.mock(Tab.class);

        TabDeletionException sut = new TabDeletionException(exMessage,
                deletedTab);

        assertSame("Didn't get the input deleted Tab from getTab()",
View Full Code Here

    public void testConstructorWithCause()
    {
        String causeMessage = "Need a cool word for this unit test";
        String exMessage = "Found it: antepenultimate.";

        Tab deletedTab = context.mock(Tab.class);

        Exception cause = new Exception(causeMessage);
        TabDeletionException sut = new TabDeletionException(exMessage, cause,
                deletedTab);
View Full Code Here

TOP

Related Classes of org.eurekastreams.server.domain.Tab

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.