APISonar


com.hitherejoe.mvvm_hackernews.model.Post.time

> com > hitherejoe > mvvm_hackernews > model > Post > time
com APIs hitherejoe APIs mvvm_hackernews APIs model APIs Post APIs time APIs

Example 1
private Post mPost;

    public void shouldGetCommentDate() throws Exception {
        String date = new PrettyTime().format(new Date(mPost.time * 1000));
        assertEquals(commentHeaderViewModel.getCommentDate(), date);
    }
Example 2
public static Post createMockStory() {
        Post story = new Post();
        story.id = generateRandomLong();
        story.postType = Post.PostType.STORY;
        story.url = "http://www.hitherejoe.com";
        story.title = generateRandomString();
        story.score = 1000L;
        story.by = "JoeBirch";
        story.time = new Date().getTime();
        return story;
    }