Skip to content

Commit

Permalink
Move remaining Vaadin 7 classes to the compatibility package
Browse files Browse the repository at this point in the history
Change-Id: I3be37350a638028d89fb527a3dfb09e74fdebeed
  • Loading branch information
Artur- committed Aug 26, 2016
1 parent 44cb252 commit 13b99cf
Show file tree
Hide file tree
Showing 19 changed files with 5 additions and 4 deletions.
@@ -1,13 +1,14 @@
package com.vaadin.tests.server.component.button; package com.vaadin.tests.server.component.button;


import java.util.concurrent.atomic.AtomicInteger;

import org.junit.Assert; import org.junit.Assert;
import org.junit.Test; import org.junit.Test;


import com.vaadin.server.VaadinRequest; import com.vaadin.server.VaadinRequest;
import com.vaadin.ui.Button; import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent; import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Button.ClickListener; import com.vaadin.ui.Button.ClickListener;
import com.vaadin.v7.data.util.ObjectProperty;
import com.vaadin.ui.UI; import com.vaadin.ui.UI;


/** /**
Expand All @@ -19,17 +20,17 @@ public class ButtonClickTest {
@Test @Test
public void clickDetachedButton() { public void clickDetachedButton() {
Button b = new Button(); Button b = new Button();
final ObjectProperty<Integer> counter = new ObjectProperty<Integer>(0); AtomicInteger counter = new AtomicInteger(0);
b.addClickListener(new ClickListener() { b.addClickListener(new ClickListener() {


@Override @Override
public void buttonClick(ClickEvent event) { public void buttonClick(ClickEvent event) {
counter.setValue(counter.getValue() + 1); counter.incrementAndGet();
} }
}); });


b.click(); b.click();
Assert.assertEquals(Integer.valueOf(1), counter.getValue()); Assert.assertEquals(1, counter.get());
} }


@Test @Test
Expand Down

0 comments on commit 13b99cf

Please sign in to comment.