def testAddNestedContainerProperty(self):
        container = BeanContainer(NestedMethodPropertyTest.Person)
        container.setBeanIdProperty('name')

        container.addBean(NestedMethodPropertyTest.Person('John',
                NestedMethodPropertyTest.Address('Ruukinkatu 2-4', 20540)))

        self.assertTrue(container.addNestedContainerProperty('address.street'))
        self.assertEquals('Ruukinkatu 2-4',
                container.getContainerProperty('John',
                        'address.street').getValue())
    def testAddBeanWithPropertyResolver(self):
        container = BeanContainer(Person)
        container.setBeanIdProperty('name')

        self.assertNotEquals(container.addBean(Person('John')), None)
        self.assertNotEquals(container.addBeanAfter(None, Person('Jane')), None)
        self.assertNotEquals(container.addBeanAt(0, Person('Jack')), None)

        container.addAll( [Person('Jill'), Person('Joe')] )

        self.assertTrue(container.containsId('John'))
        self.assertTrue(container.containsId('Jane'))
        self.assertTrue(container.containsId('Jack'))
        self.assertTrue(container.containsId('Jill'))
        self.assertTrue(container.containsId('Joe'))
        self.assertEquals(3, container.indexOfId('Jill'))
        self.assertEquals(4, container.indexOfId('Joe'))
        self.assertEquals(5, len(container))