FurnitureController furnitureController =
new FurnitureController(home, preferences, new SwingViewFactory());
FurnitureTable table = (FurnitureTable)furnitureController.getView();
assertEquals("Home furniture count and row count different", homeFurniture.size(), table.getRowCount());
// Apply a filter on furniture that refuses pieces that are windows
table.setFurnitureFilter(new FurnitureFilter() {
public boolean include(Home home, HomePieceOfFurniture piece) {
return !piece.isDoorOrWindow();
}
});
// Count how many doors and windows are in home