Package com.neophob.sematrix.core.properties

Examples of com.neophob.sematrix.core.properties.ApplicationConfigurationHelper


    @Test(expected = IllegalArgumentException.class)
    public void testMultiple2Config() {    
        Properties config = new Properties();
        config.put(ConfigConstant.RAINBOWDUINO_V2_ROW1, "4");
        config.put(ConfigConstant.PIXELINVADERS_ROW2, "NO_ROTATE");
        new ApplicationConfigurationHelper(config);
    }   
View Full Code Here


    @Test(expected = IllegalStateException.class)
    public void testLayout() {    
        Properties config = new Properties();
        config.put(ConfigConstant.NULLOUTPUT_ROW1, "4");
        config.put(ConfigConstant.NULLOUTPUT_ROW2, "2");
        new ApplicationConfigurationHelper(config).getLayout();       
    }   
View Full Code Here

    @Test(expected = IllegalArgumentException.class)
    public void testInvalidCabling() {    
        Properties config = new Properties();
        config.put(ConfigConstant.OUTPUT_MAPPING, "4,6,5, 4,2,1,8");
        config.put(ConfigConstant.OUTPUT_DEVICE_SNAKE_CABELING, "true");
        new ApplicationConfigurationHelper(config).getLayout();       
    }   
View Full Code Here

        Properties config = new Properties();
        config.put(ConfigConstant.OUTPUT_DEVICE_RESOLUTION_X, "2");
        config.put(ConfigConstant.OUTPUT_DEVICE_RESOLUTION_Y, "2");
        config.put(ConfigConstant.OUTPUT_MAPPING, "4,6,5,7");
        config.put(ConfigConstant.ARTNET_IP, "1.1.1.1");       
        new ApplicationConfigurationHelper(config).getLayout();       
    }       
View Full Code Here

        Properties config = new Properties();
        config.put(ConfigConstant.OUTPUT_DEVICE_RESOLUTION_X, "2");
        config.put(ConfigConstant.OUTPUT_DEVICE_RESOLUTION_Y, "2");
        config.put(ConfigConstant.OUTPUT_MAPPING, "4,6");
        config.put(ConfigConstant.ARTNET_IP, "1.1.1.1");
        new ApplicationConfigurationHelper(config).getLayout();       
    }   
View Full Code Here

        Properties config = new Properties();
        config.put(ConfigConstant.OUTPUT_DEVICE_RESOLUTION_X, "2");
        config.put(ConfigConstant.OUTPUT_DEVICE_RESOLUTION_Y, "2");
        config.put(ConfigConstant.OUTPUT_MAPPING, "4,6,3,1,5");
        config.put(ConfigConstant.ARTNET_IP, "1.1.1.1");
        new ApplicationConfigurationHelper(config).getLayout();       
    }   
View Full Code Here

    @Test
    public void testHorizontalLayout() {    
        Properties config = new Properties();
        config.put(ConfigConstant.NULLOUTPUT_ROW1, "3");
        config.put(ConfigConstant.NULLOUTPUT_ROW2, "0");
        ApplicationConfigurationHelper ph = new ApplicationConfigurationHelper(config);       
        assertEquals(3, ph.getNrOfScreens());
        assertEquals(LayoutName.HORIZONTAL, ph.getLayout().getLayoutName());
    }   
View Full Code Here

    @Test
    public void testBoxLayout() {    
        Properties config = new Properties();
        config.put(ConfigConstant.NULLOUTPUT_ROW1, "3");
        config.put(ConfigConstant.NULLOUTPUT_ROW2, "3");
        ApplicationConfigurationHelper ph = new ApplicationConfigurationHelper(config);       
        assertEquals(6, ph.getNrOfScreens());
        assertEquals(LayoutName.BOX, ph.getLayout().getLayoutName());
    }   
View Full Code Here

    }   
   
    @Test
    public void testLoadPresetOnStartup() {
        Properties config = new Properties();
        ApplicationConfigurationHelper ph = new ApplicationConfigurationHelper(config);
        int presetNr = ph.loadPresetOnStart(Collector.NR_OF_PRESET_SLOTS);
        assertEquals(-1, presetNr);
       
        config.put(ConfigConstant.STARTUP_LOAD_PRESET_NR, "22");
        ph = new ApplicationConfigurationHelper(config);
        presetNr = ph.loadPresetOnStart(Collector.NR_OF_PRESET_SLOTS);
        assertEquals(22, presetNr);
       
        config = new Properties();
        config.put(ConfigConstant.STARTUP_LOAD_PRESET_NR, "2222");
        ph = new ApplicationConfigurationHelper(config);
        presetNr = ph.loadPresetOnStart(Collector.NR_OF_PRESET_SLOTS);
        assertEquals(-1, presetNr);
    }
View Full Code Here

    @Test
    public void testUdpDevice() {
        Properties config = new Properties();       
        config.put(ConfigConstant.UDP_IP, "1.2.3.4");
        config.put(ConfigConstant.UDP_PORT, "15");
        ApplicationConfigurationHelper ph = new ApplicationConfigurationHelper(config);
        assertEquals(OutputDeviceEnum.UDP, ph.getOutputDevice());
        assertEquals("1.2.3.4", ph.getUdpIp());
        assertEquals(15, ph.getUdpPort());
       
        UdpDevice device = new UdpDevice(ph);
        assertTrue(device.isConnected());              
    }
View Full Code Here

TOP

Related Classes of com.neophob.sematrix.core.properties.ApplicationConfigurationHelper

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.