Package org.socialmusicdiscovery.server.business.service.browse

Examples of org.socialmusicdiscovery.server.business.service.browse.MenuLevelCommand


public class MenuLevelTest {

    @Test
    public void testClientTypesNotDefined() {
        MenuLevelCommand level = new MenuLevelCommand("test","Test");
        assert level.isVisibleForClientType("computer");
        assert level.isVisibleForClientType(null);
    }
View Full Code Here


        assert level.isVisibleForClientType(null);
    }

    @Test
    public void testClientTypesIncluded() {
        MenuLevelCommand level = new MenuLevelCommand("test","Test");
        level.getIncludedClientTypes().add("computer.web");

        assert !level.isVisibleForClientType("squeezebox");
        assert !level.isVisibleForClientType("computer");
        assert !level.isVisibleForClientType(null);
        assert level.isVisibleForClientType("computer.web");
        assert level.isVisibleForClientType("computer.web.default");
    }
View Full Code Here

        assert level.isVisibleForClientType("computer.web.default");
    }

    @Test
    public void testClientTypesExcluded() {
        MenuLevelCommand level = new MenuLevelCommand("test","Test");
        level.getExcludedClientTypes().add("computer.web");

        assert level.isVisibleForClientType("squeezebox");
        assert level.isVisibleForClientType("computer");
        assert level.isVisibleForClientType(null);
        assert !level.isVisibleForClientType("computer.web");
        assert !level.isVisibleForClientType("computer.web.default");
    }
View Full Code Here

        assert !level.isVisibleForClientType("computer.web.default");
    }

    @Test
    public void testClientTypesIncludedWithExceptions() {
        MenuLevelCommand level = new MenuLevelCommand("test","Test");
        level.getIncludedClientTypes().add("computer");
        level.getExcludedClientTypes().add("computer.web");

        assert !level.isVisibleForClientType("squeezebox");
        assert level.isVisibleForClientType("computer");
        assert level.isVisibleForClientType("computer.rich");
        assert !level.isVisibleForClientType(null);
        assert !level.isVisibleForClientType("computer.web");
        assert !level.isVisibleForClientType("computer.web.default");
    }
View Full Code Here

        assert !level.isVisibleForClientType("computer.web.default");
    }

    @Test
    public void testClientTypesExcludedWithExceptions() {
        MenuLevelCommand level = new MenuLevelCommand("test","Test");
        level.getExcludedClientTypes().add("computer");
        level.getIncludedClientTypes().add("computer.web");

        assert !level.isVisibleForClientType("squeezebox");
        assert !level.isVisibleForClientType("computer");
        assert !level.isVisibleForClientType("computer.rich");
        assert !level.isVisibleForClientType(null);
        assert level.isVisibleForClientType("computer.web");
        assert level.isVisibleForClientType("computer.web.default");
    }
View Full Code Here

TOP

Related Classes of org.socialmusicdiscovery.server.business.service.browse.MenuLevelCommand

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.