@Test public void testShare() { viewModel.initAndResume(TestData.createPost(1)); viewModel.share(); verify(navigator).share(anyString(), anyString()); }
public void share() { Post post = model.getPost(); navigator.share(post.title(), post.title() + " - " + post.url()); }
PageViewModel extends ViewModel<Post, PageModel> { public void share() { Post post = model.getPost(); navigator.share(post.title(), post.title() + " - " + post.url()); } }
PageViewModel extends ViewModel<Post, PageModel> { public void share() { Post post = model.getPost(); navigator.share(post.title(), post.title() + " - " + post.url()); } @Inject  PageViewModel(); }
PageViewModel extends ViewModel<Post, PageModel> { public void share() { Post post = model.getPost(); navigator.share(post.title(), post.title() + " - " + post.url()); } @Inject  PageViewModel(); Post getPost(); @Override void resume(); void htmlLoaded(); void share(); }
PageViewModel extends ViewModel<Post, PageModel> { public void share() { Post post = model.getPost(); navigator.share(post.title(), post.title() + " - " + post.url()); } @Inject  PageViewModel(); Post getPost(); @Override void resume(); void htmlLoaded(); void share(); public ObservableBoolean loading; }