<commit_before>package net.osten.watermap.convert;

import static org.junit.Assert.*;

import java.io.File;
import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.Set;

import net.osten.watermap.model.WaterReport;
import net.osten.watermap.model.WaterState;

import org.junit.Before;
import org.junit.Test;

public class PCTReportTest
{
   private PCTReport converter = null;

   @Before
   public void setUp() throws Exception
   {
      converter = new PCTReport();
   }

   @Test
   public void testConvertDir() throws Exception
   {
      //converter.setDataDir(System.getProperty("OPENSHIFT_DATA_DIR"));
      Set<WaterReport> results = converter.convert();
      assertNotNull(results);
      System.out.println("got " + results.size() + " results");
      assertTrue(results.size() == 337);
      
      assertTrue(results.contains(new WaterReport("WR001", "PCT Water Report")));
      assertTrue(results.contains(new WaterReport("WR004", "PCT Water Report")));
      assertTrue(results.contains(new WaterReport("WACS016", "PCT Water Report")));
      assertTrue(results.contains(new WaterReport("LkMorenaCG", "PCT Water Report")));
      
      int reportsTested = 0;

      for (WaterReport wr : results) {
         System.out.println("wr=" + wr);
         
         assertNotNull(wr.getLat());
         assertNotNull(wr.getLon());
         assertNotNull(wr.getName());
         assertNotNull(wr.getSource());
         
         // test individual reports
         

         GregorianCalendar lr = new GregorianCalendar();
         if (wr.getLastReport() != null) {
            lr.setTimeInMillis(wr.getLastReport().getTime());
         }<commit_msg>last version of HTML google docs<commit_after>package net.osten.watermap.convert;

import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;

import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.Set;

import net.osten.watermap.model.WaterReport;
import net.osten.watermap.model.WaterState;

import org.junit.Before;
import org.junit.Test;

public class PCTReportTest
{
   private PCTReport converter = null;

   @Before
   public void setUp() throws Exception
   {
      converter = new PCTReport();
   }

   @Test
   public void testConvertDir() throws Exception
   {
      //converter.setDataDir(System.getProperty("OPENSHIFT_DATA_DIR"));
      Set<WaterReport> results = converter.convert();
      assertNotNull(results);
      System.out.println("got " + results.size() + " results");
      assertThat(results.size(), is(337));
      
      assertTrue(results.contains(new WaterReport("WR001", "PCT Water Report")));
      assertTrue(results.contains(new WaterReport("WR004", "PCT Water Report")));
      assertTrue(results.contains(new WaterReport("WACS016", "PCT Water Report")));
      assertTrue(results.contains(new WaterReport("LkMorenaCG", "PCT Water Report")));
      
      int reportsTested = 0;

      for (WaterReport wr : results) {
         System.out.println("wr=" + wr);
         
         assertNotNull(wr.getLat());
         assertNotNull(wr.getLon());
         assertNotNull(wr.getName());
         assertNotNull(wr.getSource());
         
         // test individual reports
         

         GregorianCalendar lr = new GregorianCalendar();
         if (wr.getLastReport() != null) {
            lr.setTimeInMillis(wr.getLastReport().getTime());
         }
{'fraction_non_alphanumeric': 0.12454315434354793, 'fraction_numerical': 0.007309530503233062, 'mean_word_length': 3.2106508875739643, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1460748', 'n_tokens_mistral': 1037, 'n_tokens_neox': 1014, 'n_words': 209}