<commit_before>package uk.ac.ebi.spot.goci.model;

import org.junit.Before;
import org.junit.Test;
import uk.ac.ebi.spot.goci.builder.AssociationBuilder;
import uk.ac.ebi.spot.goci.exception.DocumentEmbeddingException;

import java.beans.BeanInfo;
import java.beans.IntrospectionException;
import java.beans.Introspector;
import java.beans.PropertyDescriptor;
import java.util.Collections;
import java.util.Date;

import static org.junit.Assert.fail;

/**
 * Javadocs go here!
 *
 * @author <NAME>
 * @date 14/02/15
 */
public class EmbeddableDocumentTest {
    private Study study;
    private Association association;
    private AssociationReport associationReport;
    private DiseaseTrait diseaseTrait;

    private StudyDocument studyDoc;
    private AssociationDocument associationDoc;
    private DiseaseTraitDocument traitDoc;

    @Before
    public void setUp() {
        Housekeeping h = new Housekeeping();
        h.setLastUpdateDate(new Date());
        h.setCatalogPublishDate(new Date());

        this.study = new Study("author",
                               new Date(),
                               "publication",
                               "title",
                               "initial sample size",
                               "replicate sample size",
                               "123456",
                               false,
                               false,
                               false,
                               true,
                               false,
                               null,
                               "qualifier",
                               false,
                               false,
                               "study design comment",
                               "GCST999999",
                               false,
                               Collections.EMPTY_LIST,
                               Collections.EMPTY_LIST,
                               Collections.EMPTY_LIST,
                               null,
                               Collections.EMPTY_LIST,
                               h, null, Collections.EMPTY_LIST);

        study.setId(1l);
        this.studyDoc = new StudyDocument(study);

        this.association = new AssociationBuilder().setPvalueExponent(1)
                .setPvalueMantissa(1)
                .setRiskFrequency(String.valueOf(0.5))
                .setPvalueDescription("(test)")
                .setRange("[NR]")
                .setOrPerCopyNum((float) 1.04)
                .setOrPerCopyRecip((float) 0.94)
                .setMultiSnpHaplotype(false)
                .setSnpInteraction(false)
                .setSnpApproved(false)
                .setSnpType("novel")<commit_msg>Updated failing SolrIndexer test to match new model<commit_after>package uk.ac.ebi.spot.goci.model;

import org.junit.Before;
import org.junit.Test;
import uk.ac.ebi.spot.goci.builder.AssociationBuilder;
import uk.ac.ebi.spot.goci.exception.DocumentEmbeddingException;

import java.beans.BeanInfo;
import java.beans.IntrospectionException;
import java.beans.Introspector;
import java.beans.PropertyDescriptor;
import java.util.Collections;
import java.util.Date;

import static org.junit.Assert.fail;

/**
 * Javadocs go here!
 *
 * @author <NAME>
 * @date 14/02/15
 */
public class EmbeddableDocumentTest {
    private Study study;
    private Association association;
    private AssociationReport associationReport;
    private DiseaseTrait diseaseTrait;

    private StudyDocument studyDoc;
    private AssociationDocument associationDoc;
    private DiseaseTraitDocument traitDoc;

    @Before
    public void setUp() {
        Housekeeping h = new Housekeeping();
        h.setLastUpdateDate(new Date());
        h.setCatalogPublishDate(new Date());

        this.study = new Study("author",
                               new Date(),
                               "publication",
                               "title",
                               "initial sample size",
                               "replicate sample size",
                               "123456",
                               false,
                               false,
                               false,
                               true,
                               false,
                               null,
                               "qualifier",
                               false,
                               false,
                               "study design comment",
                               "GCST999999",
                               false,
                               Collections.EMPTY_LIST,
                               Collections.EMPTY_LIST,
                               Collections.EMPTY_LIST,
                               null,
                               Collections.EMPTY_LIST,
                               h, null, Collections.EMPTY_LIST, Collections.EMPTY_LIST);

        study.setId(1l);
        this.studyDoc = new StudyDocument(study);

        this.association = new AssociationBuilder().setPvalueExponent(1)
                .setPvalueMantissa(1)
                .setRiskFrequency(String.valueOf(0.5))
                .setPvalueDescription("(test)")
                .setRange("[NR]")
                .setOrPerCopyNum((float) 1.04)
                .setOrPerCopyRecip((float) 0.94)
                .setMultiSnpHaplotype(false)
                .setSnpInteraction(false)
                .setSnpApproved(false)
                .setSnpType("novel")
{'fraction_non_alphanumeric': 0.07898550724637682, 'fraction_numerical': 0.010507246376811594, 'mean_word_length': 1.2720164609053497, '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': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1469468', 'n_tokens_mistral': 1379, 'n_tokens_neox': 1303, 'n_words': 253}