Index: BeanContextSupportTest.java =================================================================== --- BeanContextSupportTest.java (revision 478557) +++ BeanContextSupportTest.java (working copy) @@ -220,16 +220,15 @@ *
*/ public void testAddAllCollection() { - /* - * // Create an instance and add two children BeanContextSupport sup = - * new BeanContextSupport(); // Create collection with two elements - * java.util.Collection col = new java.util.ArrayList(); col.add(new - * BeanContextChildSupport()); col.add(new Object()); // Place two - * children into the BeanContext if (!sup.addAll(col)) { fail("True - * should be returned"); } // Two children must be present if - * (sup.size() != 2) { fail("The size of the collection must be 2 but is " + - * sup.size()); } - */ + try { + BeanContextServicesSupport s1 = new BeanContextServicesSupport(); + BeanContextServicesSupport s2 = new BeanContextServicesSupport(); + s1.addAll(s2); + fail("UnsupportedOperationException should be thrown"); + } catch (UnsupportedOperationException e) { + System.out.println("PASSED"); + } + } /** @@ -406,16 +405,18 @@ // BeanContextSupport sup = new BeanContextSupport(); // sup.vetoableChange(null); // } + /** * Test method propertyChange() with PropertyChangeEvent parameter. *
*/ - // public void testPropertyChangePropertyChangeEvent() { - // /** @todo: not implemented yet in the class * */ - // // Create BeanContext instance - // BeanContextSupport sup = new BeanContextSupport(); - // // sup.propertyChange(null); - // } + public void testPropertyChangePropertyChangeEvent() { + BeanContextServicesSupport s = new BeanContextServicesSupport(); + PropertyChangeSupport p= new PropertyChangeSupport(new Object()); + p.addPropertyChangeListener(s); + p.firePropertyChange(null, new Object(), new Object()); + } + /** * Test method isEmpty() with no parameters. *