/*
 * The Exomiser - A tool to annotate and prioritize genomic variants
 *
 * Copyright (c) 2016-2017 Queen Mary University of London.
 * Copyright (c) 2012-2016 Charité Universitätsmedizin Berlin and Genome Research Ltd.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package org.monarchinitiative.exomiser.data.genome.parsers;

import org.monarchinitiative.exomiser.data.genome.model.Allele;

import java.util.List;

import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.MatcherAssert.assertThat;

/**
 * @author Jules Jacobsen <j.jacobsen@qmul.ac.uk>
 */
public abstract class AbstractAlleleParserTester<T extends AlleleParser> {

    public abstract T newInstance();

    public List<Allele> parseLine(String line) {
        return newInstance().parseLine(line);
    }

    public void assertParseLineEquals(String line, List<Allele> expectedAlleles) {
        List<Allele> alleles = parseLine(line);

        assertThat(alleles.size(), equalTo(expectedAlleles.size()));
        for (int i = 0; i < alleles.size(); i++) {
            Allele allele = alleles.get(i);
            System.out.println(allele.toString());
            Allele expected = expectedAlleles.get(i);
            assertThat(allele, equalTo(expected));
            assertThat(allele.getRsId(), equalTo(expected.getRsId()));
            assertThat(allele.getValues(), equalTo(expected.getValues()));
        }
    }


}


@@ -97,9 +97,9 @@
 -201
-7
+8
  Que
@@ -1147,16 +1147,141 @@
 t;%0A%0A/**%0A
+ * Test utility class for wrapping an %7B@link AlleleParser%7D and calling/testing the %7B@code AlleleParser#parseLine%7D method.%0A *%0A
  * @auth
@@ -2061,24 +2061,109 @@
 etRsId()));%0A
+            assertThat(allele.getClinVarData(), equalTo(expected.getClinVarData()));%0A
             

Add check for ClinVarData in AbstractAlleleParserTester