import com.vaadin.data.Property;
import com.vaadin.data.Property.ValueChangeEvent;
import com.vaadin.terminal.UserError;
+import com.vaadin.tests.util.Log;
import com.vaadin.ui.AbstractComponent;
import com.vaadin.ui.Alignment;
import com.vaadin.ui.Button;
abstract protected void initializeComponents();
+ private Log log = null;
+
@Override
protected final void setup() {
((SpacingHandler) getLayout()).setSpacing(true);
protected String getDescription() {
return "Generic test case for " + getTestClass().getSimpleName();
}
+
+ protected void enableLog() {
+ if (log == null) {
+ log = new Log(5).setNumberLogRows(true);
+ getLayout().addComponent(log, 1);
+ }
+
+ }
+
+ protected void log(String msg) {
+ if (log == null) {
+ throw new IllegalStateException(
+ "Use enableLog() before calling log()");
+ }
+ log.log(msg);
+ }
}