<commit_before>package net.mollywhite.mbta.client;

import org.junit.Test;

import static org.junit.Assert.*;

public class TweetDetailsTest {

  @Test
  public void testGet() throws Exception {

  }
}<commit_msg>Add TweetDetails test<commit_after>package net.mollywhite.mbta.client;

import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import net.mollywhite.mbta.api.Line;
import net.mollywhite.mbta.api.Station;
import net.mollywhite.mbta.api.Tweet;
import org.junit.Before;
import org.junit.Test;

import static io.dropwizard.testing.FixtureHelpers.fixture;
import static org.assertj.core.api.Assertions.assertThat;

public class TweetDetailsTest {
  private ObjectMapper mapper;

  @Before
  public void setUp() throws Exception {
    mapper = new ObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
  }

  @Test
  public void testGetReplyTo() throws Exception {
    final Tweet tweet = mapper.readValue(fixture("fixtures/TweetWithReplyToFixture.json"), Tweet.class);
    final TweetDetails tweetDetails = new TweetDetails(tweet).get();
    assertThat(tweetDetails.getLines()).isEmpty();
    assertThat(tweetDetails.getBranches()).isEmpty();
    assertThat(tweetDetails.getStations()).isEmpty();
  }

  @Test
  public void testRetweet() throws Exception {
    final Tweet tweet = mapper.readValue(fixture("fixtures/RetweetFixture.json"), Tweet.class);
    final TweetDetails tweetDetails = new TweetDetails(tweet).get();
    assertThat(tweetDetails.getLines()).containsExactly(Line.ORANGE);
    assertThat(tweetDetails.getBranches()).isEmpty();
    assertThat(tweetDetails.getStations()).containsExactly(Station.WELLINGTON, Station.OAKGROVE);
  }
}
{'fraction_non_alphanumeric': 0.11225658648339061, 'fraction_numerical': 0.0, 'mean_word_length': 5.642585551330798, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2495649', 'n_tokens_mistral': 549, 'n_tokens_neox': 532, 'n_words': 95}