package org.mskcc.cbio.oncokb.util;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters;
import org.mskcc.cbio.oncokb.model.Alteration;
import org.mskcc.cbio.oncokb.model.Gene;

import java.util.Arrays;
import java.util.Collection;

import static org.testng.Assert.assertEquals;

/**
 * Created by Hongxin on 12/14/16.
 */
@RunWith(value = Parameterized.class)
public class IsOncogenicAlterationTest {

    private String hugoSymbol;
    private String alterationName;
    private Boolean isOncogenic;

    public IsOncogenicAlterationTest(String hugoSymbol, String alterationName, Boolean isOncogenic) {
        this.hugoSymbol = hugoSymbol;
        this.alterationName = alterationName;
        this.isOncogenic = isOncogenic;
    }

    @Parameters(name = "{index}: testAdd({0} , {1}) is oncogenic : {2}")
    public static Collection<Object[]> getTestData() {
        return Arrays.asList(new Object[][]{
            {"BRAF", "V600E", true}
        });
    }

    @Test
    public void test_is_oncogenic() {
        Gene gene = GeneUtils.getGeneByHugoSymbol(hugoSymbol);
        Alteration alteration = AlterationUtils.findAlteration(gene, alterationName);
        assertEquals(AlterationUtils.isOncogenicAlteration(alteration), isOncogenic);
    }
}

@@ -339,25 +339,32 @@
 tic 
-org.testng.Assert
+junit.framework.TestCase
 .ass
@@ -1277,16 +1277,29 @@
 tEquals(
+isOncogenic, 
 Alterati
@@ -1343,21 +1343,8 @@
 ion)
-, isOncogenic
 );%0A 

Fix issue left from switching testing frameworks