<commit_before>package fitnesse.slim;

import static org.junit.Assert.assertEquals;

import java.util.Date;

import org.junit.Test;

import fitnesse.slim.converters.DateConverter;

public class ConverterTest {
  @Test
  public void convertDate() throws Exception {
    DateConverter converter = new DateConverter();
    Date date = (Date) converter.fromString("5-May-2009");
    assertEquals("05-May-2009", converter.toString(date));
  }
}
<commit_msg>added unit test for BooleanConverter<commit_after>package fitnesse.slim;

import static org.junit.Assert.assertEquals;

import java.util.Date;

import org.junit.Test;

import fitnesse.slim.converters.BooleanConverter;
import fitnesse.slim.converters.DateConverter;

public class ConverterTest {
  @Test
  public void convertDate() throws Exception {
    assertConverts(new DateConverter(), "05-May-2009");
  }
  
  @Test
  public void convertDateWithoutLeadingZero() throws Exception {
    assertConverts("05-May-2009", new DateConverter(), "5-May-2009");
  }

  @Test
  public void convertBooleanTrue() throws Exception {
    BooleanConverter converter = new BooleanConverter();
    assertConverts(converter, "true");
    assertConverts("true", converter, "True");
    assertConverts("true", converter, "TRUE");
    assertConverts("true", converter, "YES");
    assertConverts("true", converter, "yes");
  }

  @Test
  public void convertBooleanFalse() throws Exception {
    BooleanConverter converter = new BooleanConverter();
    assertConverts(converter, "false");
    assertConverts("false", converter, "FALSE");
    assertConverts("false", converter, "False");
    assertConverts("false", converter, "no");
    assertConverts("false", converter, "NO");
    assertConverts("false", converter, "0");
    assertConverts("false", converter, "1");
    assertConverts("false", converter, "x");
  }
  
  private void assertConverts(Converter converter, String value) {
    assertConverts(value, converter, value);
  }
  
  private void assertConverts(String expected, Converter converter, String value) {
    assertEquals(expected, converter.toString(converter.fromString(value)));
  }
}

{'fraction_non_alphanumeric': 0.12476635514018691, 'fraction_numerical': 0.014018691588785047, 'mean_word_length': 5.048022598870056, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1671306', 'n_tokens_mistral': 650, 'n_tokens_neox': 608, 'n_words': 145}