diff --git a/src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoCancerStudy.java b/src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoCancerStudy.java index 84d08321..bae3a7be 100644 --- a/src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoCancerStudy.java +++ b/src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoCancerStudy.java @@ -39,17 +39,18 @@ import org.mskcc.cbio.portal.dao.DaoException; import org.mskcc.cbio.portal.dao.DaoTypeOfCancer; import org.mskcc.cbio.portal.model.CancerStudy; - -import java.io.IOException; -import java.util.ArrayList; - import org.mskcc.cbio.portal.model.ReferenceGenome; import org.springframework.test.annotation.Rollback; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.transaction.annotation.Transactional; -import static org.junit.Assert.*; +import java.io.IOException; +import java.util.ArrayList; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; /** * JUnit Tests for DaoCancer Study. diff --git a/src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoClinicalAttribute.java b/src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoClinicalAttribute.java index 12dee513..734a44db 100644 --- a/src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoClinicalAttribute.java +++ b/src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoClinicalAttribute.java @@ -42,7 +42,8 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.transaction.annotation.Transactional; -import static org.junit.Assert.*; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = { "classpath:/applicationContext-dao.xml" }) diff --git a/src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoGenePanel.java b/src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoGenePanel.java index 1cb31ba2..a0fbd5af 100644 --- a/src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoGenePanel.java +++ b/src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoGenePanel.java @@ -37,16 +37,17 @@ import org.mskcc.cbio.portal.dao.DaoException; import org.mskcc.cbio.portal.dao.DaoGeneOptimized; import org.mskcc.cbio.portal.dao.DaoGenePanel; -import org.mskcc.cbio.portal.model.*; - +import org.mskcc.cbio.portal.model.CanonicalGene; +import org.mskcc.cbio.portal.model.GenePanel; import org.springframework.test.annotation.Rollback; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.transaction.annotation.Transactional; -import static org.junit.Assert.*; +import java.util.HashSet; -import java.util.*; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; /** * JUnit Tests for DaoGenePanel. diff --git a/src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoGeneticAlteration.java b/src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoGeneticAlteration.java index 3e9d6fd1..000b90fa 100644 --- a/src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoGeneticAlteration.java +++ b/src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoGeneticAlteration.java @@ -35,16 +35,28 @@ import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; -import org.mskcc.cbio.portal.dao.*; -import org.mskcc.cbio.portal.model.*; +import org.mskcc.cbio.portal.dao.DaoCancerStudy; +import org.mskcc.cbio.portal.dao.DaoException; +import org.mskcc.cbio.portal.dao.DaoGeneticAlteration; +import org.mskcc.cbio.portal.dao.DaoGeneticProfile; +import org.mskcc.cbio.portal.dao.DaoGeneticProfileSamples; +import org.mskcc.cbio.portal.dao.DaoPatient; +import org.mskcc.cbio.portal.dao.DaoSample; +import org.mskcc.cbio.portal.dao.MySQLbulkLoader; +import org.mskcc.cbio.portal.model.CancerStudy; +import org.mskcc.cbio.portal.model.CanonicalGene; +import org.mskcc.cbio.portal.model.Patient; +import org.mskcc.cbio.portal.model.Sample; import org.springframework.test.annotation.Rollback; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.transaction.annotation.Transactional; -import static org.junit.Assert.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Set; -import java.util.*; +import static org.junit.Assert.assertEquals; /** * JUnit tests for DaoGeneticAlteration class. diff --git a/src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoGeneticProfile.java b/src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoGeneticProfile.java index f2378832..8c1afdcc 100644 --- a/src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoGeneticProfile.java +++ b/src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoGeneticProfile.java @@ -32,19 +32,23 @@ package org.mskcc.cbio.portal.integrationTest.dao; -import java.util.ArrayList; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mskcc.cbio.portal.dao.DaoCancerStudy; import org.mskcc.cbio.portal.dao.DaoException; import org.mskcc.cbio.portal.dao.DaoGeneticProfile; -import org.mskcc.cbio.portal.model.*; +import org.mskcc.cbio.portal.model.GeneticAlterationType; +import org.mskcc.cbio.portal.model.GeneticProfile; import org.springframework.test.annotation.Rollback; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.transaction.annotation.Transactional; -import static org.junit.Assert.*; + +import java.util.ArrayList; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; /** * JUnit tests for DaoGeneticProfile class. diff --git a/src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoGeneticProfileSamples.java b/src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoGeneticProfileSamples.java index e8cfd241..01d65388 100644 --- a/src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoGeneticProfileSamples.java +++ b/src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoGeneticProfileSamples.java @@ -35,15 +35,22 @@ import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; -import org.mskcc.cbio.portal.dao.*; -import org.mskcc.cbio.portal.model.*; +import org.mskcc.cbio.portal.dao.DaoCancerStudy; +import org.mskcc.cbio.portal.dao.DaoException; +import org.mskcc.cbio.portal.dao.DaoGeneticProfile; +import org.mskcc.cbio.portal.dao.DaoGeneticProfileSamples; +import org.mskcc.cbio.portal.dao.DaoPatient; +import org.mskcc.cbio.portal.dao.DaoSample; +import org.mskcc.cbio.portal.model.CancerStudy; +import org.mskcc.cbio.portal.model.Patient; +import org.mskcc.cbio.portal.model.Sample; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -import static org.junit.Assert.*; - import java.util.ArrayList; +import static org.junit.Assert.assertEquals; + /** * JUnit Tests for the Dao Genetic Profile Cases Class. * diff --git a/src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoGistic.java b/src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoGistic.java index 9f3af0fd..df152f7b 100644 --- a/src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoGistic.java +++ b/src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoGistic.java @@ -32,8 +32,6 @@ package org.mskcc.cbio.portal.integrationTest.dao; -import java.util.Arrays; - import org.junit.Test; import org.junit.runner.RunWith; import org.mskcc.cbio.portal.dao.DaoException; @@ -47,10 +45,12 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.transaction.annotation.Transactional; -import static org.junit.Assert.*; - import java.sql.SQLException; import java.util.ArrayList; +import java.util.Arrays; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = { "classpath:/applicationContext-dao.xml" }) diff --git a/src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoMutSig.java b/src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoMutSig.java index 0395c953..67714b6e 100644 --- a/src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoMutSig.java +++ b/src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoMutSig.java @@ -44,10 +44,11 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.transaction.annotation.Transactional; -import static org.junit.Assert.*; - import java.io.IOException; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + /** * @author Lennart Bastian */ diff --git a/src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoMutation.java b/src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoMutation.java index e4020bf7..a1331b2c 100644 --- a/src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoMutation.java +++ b/src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoMutation.java @@ -32,24 +32,33 @@ package org.mskcc.cbio.portal.integrationTest.dao; -import java.io.IOException; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; -import org.mskcc.cbio.portal.dao.*; -import org.mskcc.cbio.portal.model.*; +import org.mskcc.cbio.portal.dao.DaoCancerStudy; +import org.mskcc.cbio.portal.dao.DaoException; +import org.mskcc.cbio.portal.dao.DaoGeneOptimized; +import org.mskcc.cbio.portal.dao.DaoGeneticProfile; +import org.mskcc.cbio.portal.dao.DaoMutation; +import org.mskcc.cbio.portal.dao.DaoSample; +import org.mskcc.cbio.portal.dao.MySQLbulkLoader; +import org.mskcc.cbio.portal.model.CanonicalGene; +import org.mskcc.cbio.portal.model.ExtendedMutation; +import org.mskcc.cbio.portal.model.GeneticProfile; import org.springframework.test.annotation.Rollback; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.transaction.annotation.Transactional; -import static org.junit.Assert.*; - -import java.util.*; - -import com.fasterxml.jackson.databind.ObjectMapper; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map; +import java.util.Set; -import org.junit.Assert; +import static org.junit.Assert.assertEquals; /** * JUnit tests for DaoMutation class. diff --git a/src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoSampleList.java b/src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoSampleList.java index 3d55193f..83b807b3 100644 --- a/src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoSampleList.java +++ b/src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoSampleList.java @@ -32,19 +32,27 @@ package org.mskcc.cbio.portal.integrationTest.dao; -import java.util.ArrayList; - import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; -import org.mskcc.cbio.portal.dao.*; -import org.mskcc.cbio.portal.model.*; +import org.mskcc.cbio.portal.dao.DaoCancerStudy; +import org.mskcc.cbio.portal.dao.DaoException; +import org.mskcc.cbio.portal.dao.DaoPatient; +import org.mskcc.cbio.portal.dao.DaoSample; +import org.mskcc.cbio.portal.dao.DaoSampleList; +import org.mskcc.cbio.portal.model.CancerStudy; +import org.mskcc.cbio.portal.model.Patient; +import org.mskcc.cbio.portal.model.Sample; +import org.mskcc.cbio.portal.model.SampleList; +import org.mskcc.cbio.portal.model.SampleListCategory; import org.springframework.test.annotation.Rollback; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.transaction.annotation.Transactional; -import static org.junit.Assert.*; +import java.util.ArrayList; + +import static org.junit.Assert.assertEquals; /** * JUnit test for DaoCase List. diff --git a/src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoSampleProfile.java b/src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoSampleProfile.java index 514fcd4d..705f46b6 100644 --- a/src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoSampleProfile.java +++ b/src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoSampleProfile.java @@ -32,20 +32,32 @@ package org.mskcc.cbio.portal.integrationTest.dao; -import org.mskcc.cbio.portal.dao.*; -import org.mskcc.cbio.portal.model.*; - +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mskcc.cbio.portal.dao.DaoCancerStudy; +import org.mskcc.cbio.portal.dao.DaoException; +import org.mskcc.cbio.portal.dao.DaoGeneOptimized; +import org.mskcc.cbio.portal.dao.DaoGenePanel; +import org.mskcc.cbio.portal.dao.DaoGeneticProfile; +import org.mskcc.cbio.portal.dao.DaoPatient; +import org.mskcc.cbio.portal.dao.DaoSample; +import org.mskcc.cbio.portal.dao.DaoSampleProfile; +import org.mskcc.cbio.portal.model.CancerStudy; +import org.mskcc.cbio.portal.model.CanonicalGene; +import org.mskcc.cbio.portal.model.GenePanel; +import org.mskcc.cbio.portal.model.Patient; +import org.mskcc.cbio.portal.model.Sample; import org.springframework.test.annotation.Rollback; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.transaction.annotation.Transactional; -import org.junit.Test; -import org.junit.Before; -import org.junit.runner.RunWith; -import static org.junit.Assert.*; +import java.util.ArrayList; +import java.util.HashSet; -import java.util.*; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; /** * JUnit test for DaoSample class diff --git a/src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoUser.java b/src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoUser.java index 049ee874..2c6b78a0 100644 --- a/src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoUser.java +++ b/src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoUser.java @@ -32,10 +32,6 @@ package org.mskcc.cbio.portal.integrationTest.dao; -import static org.junit.Assert.*; - -import java.util.ArrayList; - import org.junit.Test; import org.junit.runner.RunWith; import org.mskcc.cbio.portal.dao.DaoUser; @@ -45,7 +41,14 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.transaction.annotation.Transactional; -import static org.hamcrest.CoreMatchers.*; +import java.util.ArrayList; + +import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.CoreMatchers.not; +import static org.hamcrest.CoreMatchers.notNullValue; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertThat; /** * JUnit test for DaoUser class. diff --git a/src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoUserAuthorities.java b/src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoUserAuthorities.java index 1ccc7883..556a11dd 100644 --- a/src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoUserAuthorities.java +++ b/src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoUserAuthorities.java @@ -33,12 +33,6 @@ package org.mskcc.cbio.portal.integrationTest.dao; // imports -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -import java.util.Arrays; import org.junit.Test; import org.junit.runner.RunWith; @@ -50,6 +44,13 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.transaction.annotation.Transactional; +import java.util.Arrays; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + /** * JUnit test for DaoUserAuthorities class. */ diff --git a/src/test/java/org/mskcc/cbio/portal/integrationTest/pancancer/LargeTestSetGenerator.java b/src/test/java/org/mskcc/cbio/portal/integrationTest/pancancer/LargeTestSetGenerator.java index 1dac5a88..f85d7f2b 100644 --- a/src/test/java/org/mskcc/cbio/portal/integrationTest/pancancer/LargeTestSetGenerator.java +++ b/src/test/java/org/mskcc/cbio/portal/integrationTest/pancancer/LargeTestSetGenerator.java @@ -1,7 +1,15 @@ package org.mskcc.cbio.portal.integrationTest.pancancer; -import java.io.*; -import java.util.*; +import java.io.BufferedReader; +import java.io.File; +import java.io.FileReader; +import java.io.FileWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** diff --git a/src/test/java/org/mskcc/cbio/portal/integrationTest/pancancer/TestPanCancerStudySummaryImport.java b/src/test/java/org/mskcc/cbio/portal/integrationTest/pancancer/TestPanCancerStudySummaryImport.java index 96e5ec6f..81cf6a2e 100755 --- a/src/test/java/org/mskcc/cbio/portal/integrationTest/pancancer/TestPanCancerStudySummaryImport.java +++ b/src/test/java/org/mskcc/cbio/portal/integrationTest/pancancer/TestPanCancerStudySummaryImport.java @@ -5,8 +5,19 @@ import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; -import org.mskcc.cbio.portal.dao.*; -import org.mskcc.cbio.portal.model.*; +import org.mskcc.cbio.portal.dao.DaoCancerStudy; +import org.mskcc.cbio.portal.dao.DaoClinicalData; +import org.mskcc.cbio.portal.dao.DaoException; +import org.mskcc.cbio.portal.dao.DaoGeneOptimized; +import org.mskcc.cbio.portal.dao.DaoGeneticProfile; +import org.mskcc.cbio.portal.dao.DaoPatient; +import org.mskcc.cbio.portal.dao.DaoSample; +import org.mskcc.cbio.portal.dao.DaoTypeOfCancer; +import org.mskcc.cbio.portal.model.CancerStudy; +import org.mskcc.cbio.portal.model.CanonicalGene; +import org.mskcc.cbio.portal.model.ClinicalAttribute; +import org.mskcc.cbio.portal.model.Sample; +import org.mskcc.cbio.portal.model.TypeOfCancer; import org.mskcc.cbio.portal.scripts.ImportCancerStudy; import org.mskcc.cbio.portal.scripts.ImportClinicalData; import org.mskcc.cbio.portal.scripts.ImportProfileData; diff --git a/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestGenerateMutationData.java b/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestGenerateMutationData.java index b5a785f7..66926984 100644 --- a/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestGenerateMutationData.java +++ b/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestGenerateMutationData.java @@ -41,10 +41,11 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.transaction.annotation.Transactional; -import static org.junit.Assert.*; - import java.io.File; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + /** * JUnit test for GenerateMutationData class. */ diff --git a/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportCaisesClinicalXML.java b/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportCaisesClinicalXML.java index 9c2b8d4a..e0532c90 100644 --- a/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportCaisesClinicalXML.java +++ b/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportCaisesClinicalXML.java @@ -32,8 +32,6 @@ package org.mskcc.cbio.portal.integrationTest.scripts; -import java.io.File; - import org.junit.Before; import org.junit.Ignore; import org.junit.Test; @@ -52,6 +50,8 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.transaction.annotation.Transactional; +import java.io.File; + /** * * @author jgao diff --git a/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportClinicalData.java b/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportClinicalData.java index 8cb7b923..6d1475f2 100644 --- a/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportClinicalData.java +++ b/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportClinicalData.java @@ -37,8 +37,12 @@ import org.junit.Test; import org.junit.rules.ExpectedException; import org.junit.runner.RunWith; -import org.mskcc.cbio.portal.dao.*; -import org.mskcc.cbio.portal.model.*; +import org.mskcc.cbio.portal.dao.DaoCancerStudy; +import org.mskcc.cbio.portal.dao.DaoClinicalData; +import org.mskcc.cbio.portal.dao.DaoException; +import org.mskcc.cbio.portal.model.CancerStudy; +import org.mskcc.cbio.portal.model.ClinicalParameterMap; +import org.mskcc.cbio.portal.model.Patient; import org.mskcc.cbio.portal.scripts.ImportClinicalData; import org.mskcc.cbio.portal.util.ConsoleUtil; import org.mskcc.cbio.portal.util.ProgressMonitor; @@ -47,10 +51,17 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.transaction.annotation.Transactional; -import static org.junit.Assert.*; +import java.io.File; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; -import java.io.*; -import java.util.*; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; /** * Tests Import of Clinical Data. diff --git a/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportCnaDiscreteLongData.java b/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportCnaDiscreteLongData.java index 9dafb819..74ca7874 100644 --- a/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportCnaDiscreteLongData.java +++ b/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportCnaDiscreteLongData.java @@ -27,10 +27,22 @@ package org.mskcc.cbio.portal.integrationTest.scripts; -import com.fasterxml.jackson.databind.*; -import org.junit.*; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; import org.junit.runner.RunWith; -import org.mskcc.cbio.portal.dao.*; +import org.mskcc.cbio.portal.dao.DaoCancerStudy; +import org.mskcc.cbio.portal.dao.DaoCnaEvent; +import org.mskcc.cbio.portal.dao.DaoException; +import org.mskcc.cbio.portal.dao.DaoGeneOptimized; +import org.mskcc.cbio.portal.dao.DaoGeneticAlteration; +import org.mskcc.cbio.portal.dao.DaoGeneticProfile; +import org.mskcc.cbio.portal.dao.DaoSample; +import org.mskcc.cbio.portal.dao.DaoSampleProfile; +import org.mskcc.cbio.portal.dao.JdbcUtil; +import org.mskcc.cbio.portal.dao.MySQLbulkLoader; import org.mskcc.cbio.portal.model.CnaEvent; import org.mskcc.cbio.portal.model.GeneticProfile; import org.mskcc.cbio.portal.model.Sample; @@ -46,7 +58,10 @@ import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; -import java.util.*; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; import static com.google.common.collect.Lists.newArrayList; import static com.google.common.collect.Sets.newHashSet; diff --git a/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportCopyNumberSegmentData.java b/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportCopyNumberSegmentData.java index e9d6e174..7cc50cff 100644 --- a/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportCopyNumberSegmentData.java +++ b/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportCopyNumberSegmentData.java @@ -23,14 +23,6 @@ package org.mskcc.cbio.portal.integrationTest.scripts; -import java.io.BufferedReader; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.FileReader; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - import org.junit.Before; import org.junit.Rule; import org.junit.Test; @@ -53,6 +45,14 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.transaction.annotation.Transactional; +import java.io.BufferedReader; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + /** * Test the import of Segment data into database. * @author pieterlukasse diff --git a/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportExtendedMutationData.java b/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportExtendedMutationData.java index ebf27848..b76c33d8 100644 --- a/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportExtendedMutationData.java +++ b/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportExtendedMutationData.java @@ -35,26 +35,47 @@ import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; -import org.mskcc.cbio.portal.dao.*; -import org.mskcc.cbio.portal.model.*; +import org.mskcc.cbio.portal.dao.DaoCancerStudy; +import org.mskcc.cbio.portal.dao.DaoClinicalAttributeMeta; +import org.mskcc.cbio.portal.dao.DaoClinicalData; +import org.mskcc.cbio.portal.dao.DaoException; +import org.mskcc.cbio.portal.dao.DaoGeneOptimized; +import org.mskcc.cbio.portal.dao.DaoGeneticProfile; +import org.mskcc.cbio.portal.dao.DaoMutation; +import org.mskcc.cbio.portal.dao.DaoPatient; +import org.mskcc.cbio.portal.dao.DaoSample; +import org.mskcc.cbio.portal.dao.MySQLbulkLoader; +import org.mskcc.cbio.portal.model.CancerStudy; +import org.mskcc.cbio.portal.model.CanonicalGene; +import org.mskcc.cbio.portal.model.ClinicalAttribute; +import org.mskcc.cbio.portal.model.ClinicalData; +import org.mskcc.cbio.portal.model.ExtendedMutation; +import org.mskcc.cbio.portal.model.GeneticAlterationType; +import org.mskcc.cbio.portal.model.GeneticProfile; +import org.mskcc.cbio.portal.model.Patient; +import org.mskcc.cbio.portal.model.Sample; import org.mskcc.cbio.portal.scripts.ImportExtendedMutationData; -import org.mskcc.cbio.portal.util.*; +import org.mskcc.cbio.portal.util.ConsoleUtil; +import org.mskcc.cbio.portal.util.ProgressMonitor; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.ApplicationContext; import org.springframework.test.annotation.Rollback; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.transaction.annotation.Transactional; -import static com.google.common.collect.Sets.newHashSet; -import static org.junit.Assert.*; - -import java.io.*; +import java.io.File; +import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; import java.util.List; import java.util.Set; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.ApplicationContext; + +import static com.google.common.collect.Sets.newHashSet; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; /** * @author Arthur Goldberg goldberg@cbio.mskcc.org diff --git a/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportGeneData.java b/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportGeneData.java index a8e89000..aa182c36 100644 --- a/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportGeneData.java +++ b/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportGeneData.java @@ -34,11 +34,6 @@ import org.junit.Test; import org.junit.runner.RunWith; - -import static org.junit.Assert.assertEquals; - -import java.io.File; - import org.mskcc.cbio.portal.dao.DaoGeneOptimized; import org.mskcc.cbio.portal.model.CanonicalGene; import org.mskcc.cbio.portal.scripts.ImportGeneData; @@ -48,6 +43,10 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.transaction.annotation.Transactional; +import java.io.File; + +import static org.junit.Assert.assertEquals; + /** * JUnit tests for ImportGeneData class. */ diff --git a/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportGenericAssayData.java b/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportGenericAssayData.java index 029c4ed0..a0a33c6d 100644 --- a/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportGenericAssayData.java +++ b/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportGenericAssayData.java @@ -27,15 +27,6 @@ package org.mskcc.cbio.portal.integrationTest.scripts; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; - -import java.io.File; -import java.sql.Connection; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; - import org.cbioportal.model.meta.GenericAssayMeta; import org.junit.Test; import org.junit.runner.RunWith; @@ -50,6 +41,15 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.transaction.annotation.Transactional; +import java.io.File; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; + /* * JUnit tests for ImportTreatmentData class. */ diff --git a/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportGenericAssayPatientLevelData.java b/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportGenericAssayPatientLevelData.java index f7c20bea..123715f8 100644 --- a/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportGenericAssayPatientLevelData.java +++ b/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportGenericAssayPatientLevelData.java @@ -32,27 +32,43 @@ package org.mskcc.cbio.portal.integrationTest.scripts; +import org.cbioportal.model.GeneticEntity; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; -import org.mskcc.cbio.portal.dao.*; -import org.mskcc.cbio.portal.model.*; -import org.cbioportal.model.GeneticEntity; +import org.mskcc.cbio.portal.dao.DaoCancerStudy; +import org.mskcc.cbio.portal.dao.DaoException; +import org.mskcc.cbio.portal.dao.DaoGeneOptimized; +import org.mskcc.cbio.portal.dao.DaoGenericAssay; +import org.mskcc.cbio.portal.dao.DaoGeneticAlteration; +import org.mskcc.cbio.portal.dao.DaoGeneticEntity; +import org.mskcc.cbio.portal.dao.DaoGeneticProfile; +import org.mskcc.cbio.portal.dao.DaoPatient; +import org.mskcc.cbio.portal.dao.DaoSample; +import org.mskcc.cbio.portal.dao.DaoSampleProfile; +import org.mskcc.cbio.portal.dao.MySQLbulkLoader; +import org.mskcc.cbio.portal.model.CancerStudy; +import org.mskcc.cbio.portal.model.GeneticAlterationType; +import org.mskcc.cbio.portal.model.GeneticProfile; +import org.mskcc.cbio.portal.model.Patient; +import org.mskcc.cbio.portal.model.Sample; import org.mskcc.cbio.portal.scripts.ImportGenericAssayPatientLevelData; -import org.mskcc.cbio.portal.util.*; +import org.mskcc.cbio.portal.util.FileUtil; +import org.mskcc.cbio.portal.util.ProgressMonitor; import org.springframework.test.annotation.Rollback; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.transaction.annotation.Transactional; -import static org.junit.Assert.*; - import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + /** * JUnit tests for ImportGenericAssayPatientLevelData class. */ diff --git a/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportGenesetHierarchyData.java b/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportGenesetHierarchyData.java index fd064189..8e63b1ed 100644 --- a/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportGenesetHierarchyData.java +++ b/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportGenesetHierarchyData.java @@ -29,20 +29,10 @@ import org.junit.Test; import org.junit.runner.RunWith; - -import static org.junit.Assert.assertEquals; - -import java.io.File; -import java.sql.Connection; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.List; - import org.mskcc.cbio.portal.dao.DaoException; import org.mskcc.cbio.portal.dao.DaoGeneset; -import org.mskcc.cbio.portal.dao.DaoGenesetHierarchyNode; import org.mskcc.cbio.portal.dao.DaoGenesetHierarchyLeaf; +import org.mskcc.cbio.portal.dao.DaoGenesetHierarchyNode; import org.mskcc.cbio.portal.dao.JdbcUtil; import org.mskcc.cbio.portal.model.Geneset; import org.mskcc.cbio.portal.model.GenesetHierarchy; @@ -55,6 +45,15 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.transaction.annotation.Transactional; +import java.io.File; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.List; + +import static org.junit.Assert.assertEquals; + /* * JUnit tests for ImportGenesetData class. */ diff --git a/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportProfileData.java b/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportProfileData.java index 97505f20..f1cc61fe 100644 --- a/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportProfileData.java +++ b/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportProfileData.java @@ -23,16 +23,10 @@ package org.mskcc.cbio.portal.integrationTest.scripts; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.List; - -import org.junit.*; +import org.junit.After; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; import org.junit.rules.ExpectedException; import org.junit.runner.RunWith; import org.mskcc.cbio.portal.dao.DaoCancerStudy; @@ -58,7 +52,6 @@ import org.mskcc.cbio.portal.model.Patient; import org.mskcc.cbio.portal.model.Sample; import org.mskcc.cbio.portal.model.StructuralVariant; - import org.mskcc.cbio.portal.scripts.ImportProfileData; import org.mskcc.cbio.portal.util.ConsoleUtil; import org.mskcc.cbio.portal.util.ProgressMonitor; @@ -67,6 +60,16 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.transaction.annotation.Transactional; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.List; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; + /** * @author Pieter Lukasse pieter@thehyve.nl */ diff --git a/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportReferenceGenome.java b/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportReferenceGenome.java index 0be3131c..a59ba407 100644 --- a/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportReferenceGenome.java +++ b/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportReferenceGenome.java @@ -2,11 +2,6 @@ import org.junit.Test; import org.junit.runner.RunWith; - -import static org.junit.Assert.assertEquals; - -import java.io.File; - import org.mskcc.cbio.portal.dao.DaoReferenceGenome; import org.mskcc.cbio.portal.model.ReferenceGenome; import org.mskcc.cbio.portal.scripts.ImportReferenceGenome; @@ -16,6 +11,10 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.transaction.annotation.Transactional; +import java.io.File; + +import static org.junit.Assert.assertEquals; + /** * JUnit tests for ImportGeneData class. */ diff --git a/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportStructuralVariantData.java b/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportStructuralVariantData.java index 31d2c8fa..76a58f85 100644 --- a/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportStructuralVariantData.java +++ b/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportStructuralVariantData.java @@ -27,25 +27,36 @@ package org.mskcc.cbio.portal.integrationTest.scripts; +import com.fasterxml.jackson.databind.ObjectMapper; import junitparams.JUnitParamsRunner; import junitparams.Parameters; -import com.fasterxml.jackson.databind.ObjectMapper; -import org.junit.*; +import org.junit.Before; +import org.junit.ClassRule; +import org.junit.Ignore; +import org.junit.Rule; +import org.junit.Test; import org.junit.runner.RunWith; -import org.mskcc.cbio.portal.dao.*; -import org.mskcc.cbio.portal.model.*; +import org.mskcc.cbio.portal.dao.DaoCancerStudy; +import org.mskcc.cbio.portal.dao.DaoException; +import org.mskcc.cbio.portal.dao.DaoGeneticProfile; +import org.mskcc.cbio.portal.dao.DaoStructuralVariant; +import org.mskcc.cbio.portal.dao.MySQLbulkLoader; +import org.mskcc.cbio.portal.model.StructuralVariant; import org.mskcc.cbio.portal.scripts.ImportStructuralVariantData; -import org.mskcc.cbio.portal.util.*; +import org.mskcc.cbio.portal.util.ProgressMonitor; import org.springframework.test.annotation.Rollback; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.rules.SpringClassRule; import org.springframework.test.context.junit4.rules.SpringMethodRule; import org.springframework.transaction.annotation.Transactional; +import java.io.File; +import java.io.IOException; +import java.util.List; +import java.util.Set; + import static com.google.common.collect.Sets.newHashSet; -import static org.junit.Assert.*; -import java.io.*; -import java.util.*; +import static org.junit.Assert.assertEquals; /** * Test class to test functionality of ImportStructralVariantData diff --git a/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportTabDelimData.java b/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportTabDelimData.java index 9eef51de..faf5d6ad 100644 --- a/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportTabDelimData.java +++ b/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportTabDelimData.java @@ -32,22 +32,38 @@ package org.mskcc.cbio.portal.integrationTest.scripts; -import java.io.BufferedReader; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; -import org.mskcc.cbio.portal.dao.*; -import org.mskcc.cbio.portal.model.*; +import org.mskcc.cbio.portal.dao.DaoCancerStudy; +import org.mskcc.cbio.portal.dao.DaoException; +import org.mskcc.cbio.portal.dao.DaoGeneOptimized; +import org.mskcc.cbio.portal.dao.DaoGeneset; +import org.mskcc.cbio.portal.dao.DaoGeneticAlteration; +import org.mskcc.cbio.portal.dao.DaoGeneticProfile; +import org.mskcc.cbio.portal.dao.DaoPatient; +import org.mskcc.cbio.portal.dao.DaoSample; +import org.mskcc.cbio.portal.dao.DaoSampleProfile; +import org.mskcc.cbio.portal.dao.MySQLbulkLoader; +import org.mskcc.cbio.portal.model.CancerStudy; +import org.mskcc.cbio.portal.model.CanonicalGene; +import org.mskcc.cbio.portal.model.CopyNumberStatus; +import org.mskcc.cbio.portal.model.Geneset; +import org.mskcc.cbio.portal.model.GeneticAlterationType; +import org.mskcc.cbio.portal.model.GeneticProfile; +import org.mskcc.cbio.portal.model.Patient; +import org.mskcc.cbio.portal.model.Sample; import org.mskcc.cbio.portal.scripts.ImportGenesetData; import org.mskcc.cbio.portal.scripts.ImportTabDelimData; -import org.mskcc.cbio.portal.util.*; +import org.mskcc.cbio.portal.util.ConsoleUtil; +import org.mskcc.cbio.portal.util.FileUtil; +import org.mskcc.cbio.portal.util.ProgressMonitor; import org.springframework.test.annotation.Rollback; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.transaction.annotation.Transactional; -import static org.junit.Assert.*; - +import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; @@ -59,6 +75,9 @@ import java.util.List; import java.util.Set; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + /** * JUnit tests for ImportTabDelimData class. */ diff --git a/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportUsers.java b/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportUsers.java index ad44d948..d70ea0b0 100644 --- a/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportUsers.java +++ b/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportUsers.java @@ -33,19 +33,22 @@ package org.mskcc.cbio.portal.integrationTest.scripts; // imports + import org.junit.Test; import org.junit.runner.RunWith; -import org.mskcc.cbio.portal.model.User; import org.mskcc.cbio.portal.dao.DaoUser; -import org.mskcc.cbio.portal.model.UserAuthorities; import org.mskcc.cbio.portal.dao.DaoUserAuthorities; +import org.mskcc.cbio.portal.model.User; +import org.mskcc.cbio.portal.model.UserAuthorities; import org.mskcc.cbio.portal.scripts.ImportUsers; import org.springframework.test.annotation.Rollback; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.transaction.annotation.Transactional; -import static org.junit.Assert.*; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; /** * JUnit test for ImportUsers class. diff --git a/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestIntegrationTest.java b/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestIntegrationTest.java index 3f6a51e0..bc3bbac1 100644 --- a/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestIntegrationTest.java +++ b/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestIntegrationTest.java @@ -23,29 +23,11 @@ package org.mskcc.cbio.portal.integrationTest.scripts; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.ObjectMapper; - import org.cbioportal.model.GenericAssayData; import org.cbioportal.model.GenesetMolecularData; import org.cbioportal.model.StructuralVariant; @@ -59,28 +41,28 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mskcc.cbio.portal.dao.DaoCancerStudy; +import org.mskcc.cbio.portal.dao.DaoClinicalAttributeMeta; +import org.mskcc.cbio.portal.dao.DaoClinicalData; import org.mskcc.cbio.portal.dao.DaoException; import org.mskcc.cbio.portal.dao.DaoGeneOptimized; import org.mskcc.cbio.portal.dao.DaoGeneset; +import org.mskcc.cbio.portal.dao.DaoGeneticAlteration; import org.mskcc.cbio.portal.dao.DaoGeneticEntity; +import org.mskcc.cbio.portal.dao.DaoGeneticProfile; import org.mskcc.cbio.portal.dao.DaoGistic; -import org.mskcc.cbio.portal.dao.DaoSampleList; -import org.mskcc.cbio.portal.dao.MySQLbulkLoader; import org.mskcc.cbio.portal.dao.DaoMutation; +import org.mskcc.cbio.portal.dao.DaoSampleList; import org.mskcc.cbio.portal.dao.DaoTypeOfCancer; -import org.mskcc.cbio.portal.dao.DaoClinicalData; -import org.mskcc.cbio.portal.dao.DaoGeneticProfile; -import org.mskcc.cbio.portal.dao.DaoGeneticAlteration; -import org.mskcc.cbio.portal.dao.DaoClinicalAttributeMeta; -import org.mskcc.cbio.portal.model.ClinicalData; -import org.mskcc.cbio.portal.model.ClinicalAttribute; -import org.mskcc.cbio.portal.model.GeneticProfile; -import org.mskcc.cbio.portal.model.SampleList; +import org.mskcc.cbio.portal.dao.MySQLbulkLoader; import org.mskcc.cbio.portal.model.CancerStudy; -import org.mskcc.cbio.portal.model.TypeOfCancer; import org.mskcc.cbio.portal.model.CanonicalGene; +import org.mskcc.cbio.portal.model.ClinicalAttribute; +import org.mskcc.cbio.portal.model.ClinicalData; import org.mskcc.cbio.portal.model.ExtendedMutation; +import org.mskcc.cbio.portal.model.GeneticProfile; import org.mskcc.cbio.portal.model.Gistic; +import org.mskcc.cbio.portal.model.SampleList; +import org.mskcc.cbio.portal.model.TypeOfCancer; import org.mskcc.cbio.portal.scripts.ImportGenePanel; import org.mskcc.cbio.portal.util.ConsoleUtil; import org.mskcc.cbio.portal.util.ProgressMonitor; @@ -93,6 +75,23 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.transaction.annotation.Transactional; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + /** * Integration test using the same data that is used by validation system test * "study_es_0". In the validation system test for "study_es_0" it is checked if diff --git a/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestMutationFilter.java b/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestMutationFilter.java index 75640e4d..2c193723 100644 --- a/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestMutationFilter.java +++ b/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestMutationFilter.java @@ -32,9 +32,6 @@ package org.mskcc.cbio.portal.integrationTest.scripts; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; - import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; @@ -48,6 +45,9 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.transaction.annotation.Transactional; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + /** * JUnit tests for MutationFilter class. */ diff --git a/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestNormalizeExpressionLevels.java b/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestNormalizeExpressionLevels.java index 6c0ca7b8..964ccee3 100644 --- a/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestNormalizeExpressionLevels.java +++ b/src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestNormalizeExpressionLevels.java @@ -35,11 +35,8 @@ import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; - -import static org.junit.Assert.*; - -import org.mskcc.cbio.portal.model.CanonicalGene; import org.mskcc.cbio.portal.dao.DaoGeneOptimized; +import org.mskcc.cbio.portal.model.CanonicalGene; import org.mskcc.cbio.portal.scripts.NormalizeExpressionLevels; import org.springframework.test.annotation.Rollback; import org.springframework.test.context.ContextConfiguration; @@ -51,6 +48,10 @@ import java.net.URL; import java.util.ArrayList; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = { "classpath:/applicationContext-dao.xml" }) @Rollback diff --git a/src/test/java/org/mskcc/cbio/portal/integrationTest/servlet/TestWebService.java b/src/test/java/org/mskcc/cbio/portal/integrationTest/servlet/TestWebService.java index 55cd3654..9b4917be 100644 --- a/src/test/java/org/mskcc/cbio/portal/integrationTest/servlet/TestWebService.java +++ b/src/test/java/org/mskcc/cbio/portal/integrationTest/servlet/TestWebService.java @@ -40,7 +40,11 @@ import org.mskcc.cbio.portal.dao.DaoCancerStudy; import org.mskcc.cbio.portal.dao.DaoException; import org.mskcc.cbio.portal.dao.DaoSampleList; -import org.mskcc.cbio.portal.model.*; +import org.mskcc.cbio.portal.model.CancerStudy; +import org.mskcc.cbio.portal.model.GeneticProfile; +import org.mskcc.cbio.portal.model.SampleList; +import org.mskcc.cbio.portal.model.SampleListCategory; +import org.mskcc.cbio.portal.model.User; import org.mskcc.cbio.portal.servlet.NullHttpServletRequest; import org.mskcc.cbio.portal.servlet.NullHttpServletResponse; import org.mskcc.cbio.portal.servlet.WebService; @@ -58,8 +62,13 @@ import java.util.HashSet; import java.util.List; -import static org.easymock.EasyMock.*; -import static org.junit.Assert.*; +import static org.easymock.EasyMock.createMock; +import static org.easymock.EasyMock.expect; +import static org.easymock.EasyMock.isA; +import static org.easymock.EasyMock.replay; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; /** * JUnit test for WebService class. diff --git a/src/test/java/org/mskcc/cbio/portal/integrationTest/util/TestCancerStudyReader.java b/src/test/java/org/mskcc/cbio/portal/integrationTest/util/TestCancerStudyReader.java index ce659f22..733cbc79 100644 --- a/src/test/java/org/mskcc/cbio/portal/integrationTest/util/TestCancerStudyReader.java +++ b/src/test/java/org/mskcc/cbio/portal/integrationTest/util/TestCancerStudyReader.java @@ -32,8 +32,6 @@ package org.mskcc.cbio.portal.integrationTest.util; -import java.io.File; - import org.junit.Test; import org.junit.runner.RunWith; import org.mskcc.cbio.portal.dao.DaoCancerStudy; @@ -44,7 +42,10 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.transaction.annotation.Transactional; -import static org.junit.Assert.*; +import java.io.File; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.fail; /** * JUnit test for CancerStudyReader class. diff --git a/src/test/java/org/mskcc/cbio/portal/integrationTest/util/TestGenePanelUtil.java b/src/test/java/org/mskcc/cbio/portal/integrationTest/util/TestGenePanelUtil.java index 0c289e1c..e86341d0 100644 --- a/src/test/java/org/mskcc/cbio/portal/integrationTest/util/TestGenePanelUtil.java +++ b/src/test/java/org/mskcc/cbio/portal/integrationTest/util/TestGenePanelUtil.java @@ -15,7 +15,10 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; -import static org.mskcc.cbio.portal.util.GenePanelUtil.*; +import static org.mskcc.cbio.portal.util.GenePanelUtil.Pair; +import static org.mskcc.cbio.portal.util.GenePanelUtil.extractGenes; +import static org.mskcc.cbio.portal.util.GenePanelUtil.extractPropertyValue; +import static org.mskcc.cbio.portal.util.GenePanelUtil.getAddRemove; @RunWith(SpringJUnit4ClassRunner.class) diff --git a/src/test/java/org/mskcc/cbio/portal/integrationTest/util/TestGeneticProfileReader.java b/src/test/java/org/mskcc/cbio/portal/integrationTest/util/TestGeneticProfileReader.java index 7d8d2f74..af6eaf95 100644 --- a/src/test/java/org/mskcc/cbio/portal/integrationTest/util/TestGeneticProfileReader.java +++ b/src/test/java/org/mskcc/cbio/portal/integrationTest/util/TestGeneticProfileReader.java @@ -46,12 +46,12 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.transaction.annotation.Transactional; -import static org.junit.Assert.*; - import java.io.File; import java.io.IOException; import java.util.ArrayList; +import static org.junit.Assert.assertEquals; + /** * JUnit test for GeneticProfileReader class. */ diff --git a/src/test/java/org/mskcc/cbio/portal/integrationTest/util/TestMutSigReader.java b/src/test/java/org/mskcc/cbio/portal/integrationTest/util/TestMutSigReader.java index 4a60f9ac..85c01d28 100644 --- a/src/test/java/org/mskcc/cbio/portal/integrationTest/util/TestMutSigReader.java +++ b/src/test/java/org/mskcc/cbio/portal/integrationTest/util/TestMutSigReader.java @@ -35,8 +35,12 @@ import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; -import org.mskcc.cbio.portal.dao.*; -import org.mskcc.cbio.portal.model.*; +import org.mskcc.cbio.portal.dao.DaoCancerStudy; +import org.mskcc.cbio.portal.dao.DaoException; +import org.mskcc.cbio.portal.dao.DaoGeneticProfile; +import org.mskcc.cbio.portal.dao.DaoMutSig; +import org.mskcc.cbio.portal.model.CanonicalGene; +import org.mskcc.cbio.portal.model.MutSig; import org.mskcc.cbio.portal.util.MutSigReader; import org.mskcc.cbio.portal.util.ProgressMonitor; import org.springframework.test.annotation.Rollback; @@ -44,10 +48,11 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.transaction.annotation.Transactional; -import static org.junit.Assert.*; - import java.io.File; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = { "classpath:/applicationContext-dao.xml" }) @Rollback diff --git a/src/test/java/org/mskcc/cbio/portal/integrationTest/web_api/TestGetGeneticProfiles.java b/src/test/java/org/mskcc/cbio/portal/integrationTest/web_api/TestGetGeneticProfiles.java index 414d90b1..ede6b433 100644 --- a/src/test/java/org/mskcc/cbio/portal/integrationTest/web_api/TestGetGeneticProfiles.java +++ b/src/test/java/org/mskcc/cbio/portal/integrationTest/web_api/TestGetGeneticProfiles.java @@ -41,7 +41,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.transaction.annotation.Transactional; -import static org.junit.Assert.*; +import static org.junit.Assert.assertTrue; /** * JUnit test for GeneticProfile class. diff --git a/src/test/java/org/mskcc/cbio/portal/integrationTest/web_api/TestGetMutSig.java b/src/test/java/org/mskcc/cbio/portal/integrationTest/web_api/TestGetMutSig.java index 5a9870c4..e7d33db7 100644 --- a/src/test/java/org/mskcc/cbio/portal/integrationTest/web_api/TestGetMutSig.java +++ b/src/test/java/org/mskcc/cbio/portal/integrationTest/web_api/TestGetMutSig.java @@ -37,21 +37,22 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mskcc.cbio.portal.dao.DaoCancerStudy; +import org.mskcc.cbio.portal.dao.DaoException; import org.mskcc.cbio.portal.dao.DaoGeneOptimized; import org.mskcc.cbio.portal.dao.DaoGeneticProfile; import org.mskcc.cbio.portal.dao.DaoMutSig; import org.mskcc.cbio.portal.model.CanonicalGene; import org.mskcc.cbio.portal.model.MutSig; -import org.mskcc.cbio.portal.dao.DaoException; import org.mskcc.cbio.portal.web_api.GetMutSig; import org.springframework.test.annotation.Rollback; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.transaction.annotation.Transactional; -import static org.junit.Assert.*; +import java.io.IOException; -import java.io.*; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; /** * @author Lennart Bastian diff --git a/src/test/java/org/mskcc/cbio/portal/integrationTest/web_api/TestGetProfileData.java b/src/test/java/org/mskcc/cbio/portal/integrationTest/web_api/TestGetProfileData.java index 2cd1bf8e..8fdff896 100644 --- a/src/test/java/org/mskcc/cbio/portal/integrationTest/web_api/TestGetProfileData.java +++ b/src/test/java/org/mskcc/cbio/portal/integrationTest/web_api/TestGetProfileData.java @@ -35,19 +35,27 @@ import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; -import org.mskcc.cbio.portal.dao.*; -import org.mskcc.cbio.portal.model.*; +import org.mskcc.cbio.portal.dao.DaoCancerStudy; +import org.mskcc.cbio.portal.dao.DaoException; +import org.mskcc.cbio.portal.dao.DaoGeneOptimized; +import org.mskcc.cbio.portal.dao.DaoGeneticProfile; +import org.mskcc.cbio.portal.dao.DaoPatient; +import org.mskcc.cbio.portal.dao.DaoSample; +import org.mskcc.cbio.portal.model.CanonicalGene; +import org.mskcc.cbio.portal.model.GeneticAlterationType; +import org.mskcc.cbio.portal.model.GeneticProfile; import org.mskcc.cbio.portal.web_api.GetProfileData; import org.springframework.test.annotation.Rollback; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.transaction.annotation.Transactional; -import static org.junit.Assert.*; - import java.io.IOException; import java.util.ArrayList; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + /** * JUnit test for GetProfileData class. */ diff --git a/src/test/java/org/mskcc/cbio/portal/integrationTest/web_api/TestGetSampleList.java b/src/test/java/org/mskcc/cbio/portal/integrationTest/web_api/TestGetSampleList.java index 6ee09bd3..598269ce 100644 --- a/src/test/java/org/mskcc/cbio/portal/integrationTest/web_api/TestGetSampleList.java +++ b/src/test/java/org/mskcc/cbio/portal/integrationTest/web_api/TestGetSampleList.java @@ -40,7 +40,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.transaction.annotation.Transactional; -import static org.junit.Assert.*; +import static org.junit.Assert.assertTrue; /** * JUnit test for GetSampleLists class. diff --git a/src/test/java/org/mskcc/cbio/portal/integrationTest/web_api/TestGetTypesOfCancer.java b/src/test/java/org/mskcc/cbio/portal/integrationTest/web_api/TestGetTypesOfCancer.java index 7502d93d..51b1d78d 100644 --- a/src/test/java/org/mskcc/cbio/portal/integrationTest/web_api/TestGetTypesOfCancer.java +++ b/src/test/java/org/mskcc/cbio/portal/integrationTest/web_api/TestGetTypesOfCancer.java @@ -49,10 +49,12 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.transaction.annotation.Transactional; -import static org.junit.Assert.*; - import java.io.IOException; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + /** * JUnit Tests for GetTypes of Cancer. *