<commit_before>/*
 * Copyright 2016 West Coast Informatics, LLC
 */
package com.wci.umls.server.jpa.lists;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

import com.wci.umls.server.helpers.ProxyTester;
import com.wci.umls.server.helpers.SearchResult;
import com.wci.umls.server.helpers.SearchResultList;
import com.wci.umls.server.jpa.helpers.SearchResultJpa;
import com.wci.umls.server.jpa.helpers.SearchResultListJpa;

/**
 * Unit testing for {@link SearchResultList}.
 */
public class SearchResultListUnitTest extends AbstractListUnit<SearchResult> {

  /** The list1 test fixture . */
  private SearchResultList list1;

  /** The list2 test fixture . */
  private SearchResultList list2;

  /** The test fixture o1. */
  private SearchResult o1;

  /** The test fixture o2. */
  private SearchResult o2;

  /**
   * Setup class.
   */
  @BeforeClass
  public static void setupClass() {
    // do nothing
  }

  /**
   * Setup.
   *
   * @throws Exception the exception
   */
  @Before
  public void setup() throws Exception {
    list1 = new SearchResultListJpa();
    list2 = new SearchResultListJpa();

    ProxyTester tester = new ProxyTester(new SearchResultJpa());
    o1 = (SearchResult) tester.createObject(1);
    o2 = (SearchResult) tester.createObject(2);

  }

  /**
   * Test normal use of a list.
   * @throws Exception the exception
   */
  @Test
  public void testNormalUse015() throws Exception {
    testNormalUse(list1, list2, o1, o2);
  }

  /**
   * Test degenerate use of a list. Show that the underlying data structure
   * should NOT be manipulated.
   * 
   * @throws Exception the exception
   */
  @Test<commit_msg>Fixed unit test for SearchResultList, now accommodates property key value pair<commit_after>/*
 * Copyright 2016 West Coast Informatics, LLC
 */
package com.wci.umls.server.jpa.lists;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

import com.wci.umls.server.helpers.KeyValuePair;
import com.wci.umls.server.helpers.ProxyTester;
import com.wci.umls.server.helpers.SearchResult;
import com.wci.umls.server.helpers.SearchResultList;
import com.wci.umls.server.jpa.helpers.SearchResultJpa;
import com.wci.umls.server.jpa.helpers.SearchResultListJpa;

/**
 * Unit testing for {@link SearchResultList}.
 */
public class SearchResultListUnitTest extends AbstractListUnit<SearchResult> {

  /** The list1 test fixture . */
  private SearchResultList list1;

  /** The list2 test fixture . */
  private SearchResultList list2;

  /** The test fixture o1. */
  private SearchResult o1;

  /** The test fixture o2. */
  private SearchResult o2;
  
  /** The property key value pair kv1 */
  private KeyValuePair kv1;
  
  /** The property key value pair kv2 */
  private KeyValuePair kv2;

  /**
   * Setup class.
   */
  @BeforeClass
  public static void setupClass() {
    // do nothing
  }

  /**
   * Setup.
   *
   * @throws Exception the exception
   */
  @Before
  public void setup() throws Exception {
    list1 = new SearchResultListJpa();
    list2 = new SearchResultListJpa();

    ProxyTester tester = new ProxyTester(new SearchResultJpa());
    o1 = (SearchResult) tester.createObject(1);
    o2 = (SearchResult) tester.createObject(2);
    kv1 = new KeyValuePair("1", "1");
    kv2 = new KeyValuePair("2", "2");
    o1.setProperty(kv1);
    o2.setProperty(kv2);

  }

  /**
   * Test normal use of a list.
   * @throws Exception the exception
   */
  @Test
  public void testNormalUse015() throws Exception {
    testNormalUse(list1, list2, o1, o2);
  }

  /**
   * Test degenerate use of a list. Show that the underlying data structure
   * should NOT be manipulated.
   * 
   * @throws Exception the exception
   */
  @Test
{'fraction_non_alphanumeric': 0.11206448257930317, 'fraction_numerical': 0.016640665626625067, 'mean_word_length': 3.3518099547511313, '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': '5632234', 'n_tokens_mistral': 1257, 'n_tokens_neox': 1219, 'n_words': 329}