Skip to content

Instantly share code, notes, and snippets.

@guigarage
Last active August 29, 2015 14:06
Show Gist options
  • Save guigarage/5a3b3b2ad9c881e442e2 to your computer and use it in GitHub Desktop.
Save guigarage/5a3b3b2ad9c881e442e2 to your computer and use it in GitHub Desktop.
DialogObject example
public class AlbumOverviewView extends ViewObject {
public AlbumDetailView openAlbum(String name) {
click((Text t) -> t.getText().contains(name));
return new AlbumDetailView(getTestHandler());
}
public AlbumOverviewView checkAlbumCount(int count) {
assertEquals(count, getList().size());
return this;
}
public AlbumOverviewView assertContainsAlbum(String name) {
assertTrue(getAlbums().filtered(a -> a.getName().equals(name)).isEmpty());
return this;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment