Examples of Config


Examples of org.ngrinder.infra.config.Config

  public void before() {
  }

  @Test
  public void testGetRegionsInCluster() throws IOException {
    Config spiedConfig = spy(config);
    when(spiedConfig.isClustered()).thenReturn(true);
    when(spiedConfig.getRegion()).thenReturn("TEST_REGION");

    RegionService spiedRegionService = spy(regionService);
    spiedRegionService.setConfig(spiedConfig);

    curAddress = removeScopedMarkerFromIP(NetworkUtils.DEFAULT_LOCAL_ADDRESSES.get(0).getHostAddress());
    when(spiedConfig.getClusterURIs()).thenReturn(new String[]{curAddress, "210.10.10.1"});

    DynamicCacheConfig cacheConfig = new DynamicCacheConfig();
    ReflectionTestUtils.setField(cacheConfig, "config", spiedConfig);
    cacheManager = cacheConfig.dynamicCacheManager();
    cacheManager.afterPropertiesSet();
View Full Code Here

Examples of org.onpu.websimlpe.common.Config

import junit.framework.TestCase;
import org.onpu.websimlpe.common.Config;

public class ConfigTest extends TestCase {
    public void test() throws  Exception {
        Config config = Config.getInstance();
        assertEquals(config.get("server.port"), "8000");
        assertNull(config.get("incorrect.key"));
    }
View Full Code Here

Examples of org.playorm.cron.impl.Config

    String rateStr = (String) rateObj;
    rate = Long.parseLong(rateStr);
   
    String host = (String) properties.get(CronServiceFactory.HOST_UNIQUE_NAME);
   
    config = new Config(rate, host);
   
    generator = (HashGenerator)properties.get(HASH_GENERATOR);
    if(generator == null)
      generator = new HashGeneratorImpl();
  }
View Full Code Here

Examples of org.playorm.monitor.impl.Config

    String rateStr = (String) rateObj;
    rate = Long.parseLong(rateStr);
   
    String host = (String) properties.get(MonitorServiceFactory.HOST_UNIQUE_NAME);
   
    config = new Config(rate, host);
   
    generator = (HashGenerator)properties.get(HASH_GENERATOR);
    if(generator == null)
      generator = new HashGeneratorImpl();
  }
View Full Code Here

Examples of org.raist.config.Config

    @Override
    public long getLong(String key, long val) {

      for(String node : path) {

        Config c = manager.getConfig(node);
        if( c.hasValue(key) )
          return c.getLong(key, val);
      }
      return val;
    }
View Full Code Here

Examples of org.sd_network.util.Config

    ////////////////////////////////////////////////////////////
    // Constructors, Initializations and Finalizations.

    public DBUtilTest(String name) {
        super(name);
        Config config = Config.getInstance();
        ConnectionPool pool = ConnectionPool.getInstance();
    }
View Full Code Here

Examples of org.shaitu.easyphoto.config.Config

     * remember operation params in last image proceed action
     * @param vo
     */
    public static void rememberOperParams(ImageActionParamsVO vo) {
        try{
            Config config = Config.getInstance();
            //image choose
            if(vo.getInputFiles() != null && vo.getInputFiles().length > 0){
                config.setValue("input_files", vo.getInputFiles()[0].getAbsolutePath());
            }
            if(vo.getOutputFolder() != null){
                config.setValue("output_folder", vo.getOutputFolder().getAbsolutePath());
            }
            config.setValue("override", vo.isOverride());
            //export options
            config.setValue("quality", vo.getQuality());
            config.setValue("apply_resize", vo.isApplyResize());
            config.setValue("resize", vo.getResize());
            config.setValue("resize_index", vo.getResizeIndex());
            //corner round
            config.setValue("apply_round", vo.isApplyRound());
            config.setValue("corner_size", vo.getCornerSize());
            //exif info
            config.setValue("apply_exif", vo.isApplyExif());
            config.setValue("exif_style", vo.getExifStyle());
            config.setValue("append_camera", vo.isAppendCamera());
            config.setValue("append_date", vo.isAppendDate());
            config.setValue("append_apt", vo.isAppendApt());
            config.setValue("append_exp", vo.isAppendExp());
            config.setValue("append_focal", vo.isAppendFocal());
            config.setValue("append_iso", vo.isAppendIso());
            config.setValue("sign", vo.getSign());
            config.setValue("exif_font", UIUtil.getFontDescription(vo.getExifFont()));
            //text watermark
            config.setValue("apply_text_watermark", vo.isApplyWatermarkText());
            config.setValue("text_watermark_style", vo.getWatermarkTextStyle());
            config.setValue("text_watermark", vo.getWatermarkText());
            config.setValue("text_watermakr_font", UIUtil.getFontDescription(vo.getWatermarkTextFont()));
            config.setValue("text_watermakr_color", vo.getWatermarkColor().getRGB());
            config.setValue("text_watermark_alpha", vo.getWatermarkTextAlpha());
            config.storeConf();
        }catch(Exception e){
            e.printStackTrace();;
        }
    }
View Full Code Here

Examples of org.sonatype.maven.polyglot.ruby.ConfigVisitor.Config

            else
            {
                append( "," ).println();
                print( indent );
            }
            Config config = entry.getValue();
            switch ( config.type )
            {
            case SINGLE:
                append( "'" ).append( entry.getKey() ).append( "' => " );
                if ( config.value != null )
View Full Code Here

Examples of org.sonatype.plexus.components.sec.dispatcher.model.Config

        if( cl == null )
            return null;
       
        for( Iterator i = cl.iterator(); i.hasNext(); )
        {
            Config cf = (Config) i.next();
           
            if( !name.equals( cf.getName() ) )
                continue;
           
            List pl = cf.getProperties();
           
            if( pl == null || pl.isEmpty() )
                return null;
           
            Map res = new HashMap( pl.size() );
View Full Code Here

Examples of org.syncany.config.Config

  }
 
  @Test
  public void testConfigHelperLoadConfig() throws Exception {
    // Setup
    Config testConfig = TestConfigUtil.createTestLocalConfig();
   
    // Run
    Config loadedConfig = ConfigHelper.loadConfig(testConfig.getLocalDir());
   
    // Test
    assertNotNull(loadedConfig);
    assertEquals(testConfig.getAppDir(), loadedConfig.getAppDir());
    assertEquals(testConfig.getCacheDir(), loadedConfig.getCacheDir());
    assertNotNull(loadedConfig.getChunker());
    assertEquals(testConfig.getChunker().toString(), loadedConfig.getChunker().toString());
    assertNotNull(loadedConfig.getCache());
    assertNotNull(loadedConfig.getConnection());
    assertEquals(testConfig.getDatabaseDir(), loadedConfig.getDatabaseDir());   
    assertEquals(testConfig.getDatabaseFile(), loadedConfig.getDatabaseFile());
    assertEquals(testConfig.getDisplayName(), loadedConfig.getDisplayName());
    assertEquals(testConfig.getLocalDir(), loadedConfig.getLocalDir());
    assertEquals(testConfig.getLogDir(), loadedConfig.getLogDir());
    assertEquals(testConfig.getMachineName(), loadedConfig.getMachineName());
    assertEquals(testConfig.getMasterKey(), loadedConfig.getMasterKey());
    assertNotNull(loadedConfig.getMultiChunker());
    assertNotNull(loadedConfig.getRepoId());
    assertNotNull(loadedConfig.getTransformer());

    // Tear down
    TestConfigUtil.deleteTestLocalConfigAndData(testConfig);   
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.