<commit_before>package org.codice.usng4j.impl;

import static org.junit.Assert.fail;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import java.io.IOException;
import java.io.InputStreamReader;
import org.junit.Test;

public class UtmUpsCoordinateImplTest {

  private Gson gson = new GsonBuilder().create();

  private InputStreamReader reader(String file) throws IOException {
    return new InputStreamReader(UtmUpsCoordinateImplTest.class.getResourceAsStream(file), "UTF-8");
  }

  // UTM parsing tests

  @Test
  public void testParsingUtmAsUtm() {
    fail();
  }

  @Test
  public void testParsingInvalidUtm() {
    fail();
  }

  @Test
  public void testParsingUpsAsUtm() {
    fail();
  }

  @Test
  public void testParsingUtmOverlappingUpsAsUtm() {
    fail();
  }

  // UPS parsing tests

  @Test
  public void testParsingUpsAsUps() throws IOException {
    UtmUpsCoordinateImpl[] upsObjects =
        gson.fromJson(reader("/ValidUpsCoordinates.json"), UtmUpsCoordinateImpl[].class);
    for (UtmUpsCoordinateImpl upsCoordinate : upsObjects) {
      System.out.println(upsCoordinate.toString());
    }
    fail();
  }

  @Test<commit_msg>Updated `UtmUpsCoordinateImplTest` to read test objects into their own class instances.<commit_after>package org.codice.usng4j.impl;

import static org.junit.Assert.fail;


import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.reflect.TypeToken;
import java.io.IOException;
import java.io.InputStreamReader;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;
import org.junit.BeforeClass;
import org.junit.Test;

public class UtmUpsCoordinateImplTest {

  class UtmUpsTestData {
    final double latitude;
    final double longitude;
    final double easting;
    final double northing;
    final boolean northPole;

    UtmUpsTestData(
        final double latitude,
        final double longitude,
        final double easting,
        final double northing,
        final boolean northPole) {
      this.latitude = latitude;
      this.longitude = longitude;
      this.easting = easting;
      this.northing = northing;
      this.northPole = northPole;
    }

    @Override
    public String toString() {
      return String.format("Lat: %f,  Lon: %f,  E: %f,  N: %f,  NP: %b",
        latitude, longitude, easting, northing, northPole);
    }
  }

  private static final List<UtmUpsTestData> validUpsCoordinatesTests = new ArrayList<>();
  private static final List<UtmUpsTestData> validUtmCoordinatesTests = new ArrayList<>();

  private static InputStreamReader reader(final String fileName)
    throws IOException {
    return new InputStreamReader(UtmUpsCoordinateImplTest.class.getResourceAsStream(fileName), "UTF-8");
  }

  @BeforeClass
  public static void allTestsSetup() throws IOException {
    final Gson gson = new GsonBuilder().create();
    final Type testDataListType = new TypeToken<List<UtmUpsTestData>>() {}.getType();
    validUpsCoordinatesTests.addAll(gson.fromJson(
      reader("/ValidUpsCoordinates.json"), testDataListType));
    // TODO:  add a set of valid UTM coordinates test data
    // validUtmCoordinatesTests.addAll(gson.fromJson(
    //  reader("/ValidUtmCoordinates.json"), testDataListType));
    // TODO:  add a set of invalid UPS and UTM coordinates test data
    // TODO:  add reading invalid tests
  }

  // UTM parsing tests

  @Test
  public void testParsingUtmAsUtm() {
    fail();
  }

  @Test
  public void testParsingInvalidUtm() {
    fail();
  }

  @Test
  public void testParsingUpsAsUtm() {
    fail();
  }

  @Test
  public void testParsingUtmOverlappingUpsAsUtm() {
    fail();
  }

  // UPS parsing tests

  @Test
  public void testParsingUpsAsUps() throws IOException {
    fail();
  }

  @Test
{'fraction_non_alphanumeric': 0.0997624703087886, 'fraction_numerical': 0.0010556875164951175, 'mean_word_length': 3.638922888616891, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '1466969', 'n_tokens_mistral': 1233, 'n_tokens_neox': 1192, 'n_words': 287}