@Test
public void testOneToManyWrongAssociation() {
deleteAndPopulateTables("users", "addresses");
final User user = User.findById(1);
expect(new ExceptionExpectation(NotAssociatedException.class){
public void exec() {
user.getAll(Book.class);//wrong table
}
});
expect(new ExceptionExpectation(NotAssociatedException.class){
public void exec() {
user.getAll(Book.class);//non-existent table
}
});