[logback-dev] svn commit: r804 - logback/trunk/logback-core/src/test/java/ch/qos/logback/core/util

noreply.seb at qos.ch noreply.seb at qos.ch
Fri Oct 27 15:39:43 CEST 2006


Author: seb
Date: Fri Oct 27 15:39:43 2006
New Revision: 804

Modified:
   logback/trunk/logback-core/src/test/java/ch/qos/logback/core/util/PropertySetterTest.java

Log:
added a testSetComponentWithCamelCaseName, trying to catch the wrong behaviour mentionned in bug#18

Modified: logback/trunk/logback-core/src/test/java/ch/qos/logback/core/util/PropertySetterTest.java
==============================================================================
--- logback/trunk/logback-core/src/test/java/ch/qos/logback/core/util/PropertySetterTest.java	(original)
+++ logback/trunk/logback-core/src/test/java/ch/qos/logback/core/util/PropertySetterTest.java	Fri Oct 27 15:39:43 2006
@@ -60,6 +60,7 @@
     assertEquals("raven", house.getOnMatch());
     
   }
+  
   public void testSetComponent() {
     House house = new House();
     Door door = new Door();
@@ -67,6 +68,14 @@
     setter.setComponent("door", door);
     assertEquals(door, house.getDoor());
   }
+  
+  public void testSetComponentWithCamelCaseName() {
+    House house = new House();
+    SwimmingPool pool = new SwimmingPool();
+    PropertySetter setter = new PropertySetter(house);
+    setter.setComponent("swimmingPool", pool);
+    assertEquals(pool, house.getSwimmingPool());
+  }
 
 }
 
@@ -77,6 +86,7 @@
   String name;
   String camelCase;
   String onMatch;
+  SwimmingPool pool;
   
   public String getOnMatch() {
     return onMatch;
@@ -125,8 +135,22 @@
   public void setOpen(boolean open) {
     this.open = open;
   }
+  
+  public void setSwimmingPool(SwimmingPool pool) {
+    this.pool = pool;
+  }
+  
+  public SwimmingPool getSwimmingPool() {
+    return pool;
+  }
 }
 
 class Door {
   int handle;
 }
+
+class SwimmingPool {
+  int length;
+  int width;
+  int depth;
+}



More information about the logback-dev mailing list