Examples of PropertyStore


Examples of org.apache.kato.tck.api.PropertyStore

   
   
    Properties source=new Properties();
    source.setProperty("a", "1");
   
    PropertyStore targetStore=new PropertyStore();
    PropertyStore sourceStore=new PropertyStore(source,"a",targetStore);
   
    assertTrue(sourceStore.hasProperty("a"));
    assertEquals("1",(String)sourceStore.getProperty("a"));
   
   
  }
View Full Code Here

Examples of org.apache.kato.tck.api.PropertyStore

   
  }
 
  public void testNotOveridingIntoTarget() {
   
    PropertyStore target=new PropertyStore();
    PropertyStore source=new PropertyStore(target);
   
   
    target.setProperty("a", "1");
    source.setProperty("a", "2");
   
   
    assertTrue(target.hasProperty("a"));
    assertEquals("1",(String)target.getProperty("a"));
   
View Full Code Here

Examples of org.apache.kato.tck.api.PropertyStore

   
   
  }
  public void testCompleteReplacement() {
   
    PropertyStore target=new PropertyStore();
    PropertyStore source=new PropertyStore(target);
   
    target.setProperty("a", "1");
    source.setProperty("b", "${a}");
   
   
    assertTrue(source.hasProperty("b"));
    assertEquals("1",(String)source.getProperty("b"));
   
   
  }
View Full Code Here

Examples of org.apache.kato.tck.api.PropertyStore

   
   
  }
  public void testMultipleReplacement() {
   
    PropertyStore target=new PropertyStore();
    PropertyStore source=new PropertyStore(target);
   
   
    target.setProperty("a", "1000");
    source.setProperty("b", "start ${a} middle ${a} end");
   
   
    assertTrue(source.hasProperty("b"));
    assertEquals("start 1000 middle 1000 end",(String)source.getProperty("b"));
   
   
  }
View Full Code Here

Examples of org.apache.kato.tck.api.PropertyStore

   
   
  }
  public void testEndReplacement() {
   
    PropertyStore target=new PropertyStore();
    PropertyStore source=new PropertyStore(target);
   
    target.setProperty("end", "1000");
    source.setProperty("b", "start ${end}");
   
   
   
    assertTrue(source.hasProperty("b"));
    assertEquals("start 1000",(String)source.getProperty("b"));
   
   
  }
View Full Code Here

Examples of org.apache.kato.tck.api.PropertyStore

   
   
  }
  public void testStartReplacement() {
   
    PropertyStore target=new PropertyStore();
    PropertyStore source=new PropertyStore(target);
   
    target.setProperty("start", "1000");
    source.setProperty("b", "${start} end");
   
   
   
    assertTrue(source.hasProperty("b"));
    assertEquals("1000 end",(String)source.getProperty("b"));
   
   
  }
View Full Code Here

Examples of org.apache.kato.tck.api.PropertyStore

   
  }
 
  public void IgnoretestCyclicReferencesDetected() {
 
    PropertyStore a=new PropertyStore();
    a.setProperty("a", "${b}");
    PropertyStore b=new PropertyStore(a);
    b.setProperty("b", "${a}");
    try {
    String value=b.getProperty("b");
    fail("expected runtime exception");
    }
    catch(RuntimeException re) {
      ; // as expected
    }
View Full Code Here

Examples of org.apache.kato.tck.api.PropertyStore

   
   
  }
  public void testDynamicUpdates() {
   
    PropertyStore a=new PropertyStore();
    a.setProperty("a", "1");
    PropertyStore b=new PropertyStore(a);
   
    b.setProperty("b", "${a}");
   
    assertEquals("1",b.getProperty("b"));
   
    // change property
    a.setProperty("a", "2");
    assertEquals("2",b.getProperty("b"));
   
  }
View Full Code Here

Examples of org.apache.kato.tck.api.PropertyStore

   
  }

  public void testPropertyAsArrayNoValue() {

    PropertyStore a=new PropertyStore();
   
    String[] array=a.getPropertyAsArray("a",",");
    assertNull(array);
   
  }
View Full Code Here

Examples of org.apache.kato.tck.api.PropertyStore

   
  }

  public void testPropertyAsArrayNoSeperator() {

    PropertyStore a=new PropertyStore();
    a.setProperty("a", "123456");
    String[] array=a.getPropertyAsArray("a",",");
    assertEquals("123456",array[0]);
   
  }
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.