Skip to content

Commit

Permalink
deleting all data in db before and after test
Browse files Browse the repository at this point in the history
  • Loading branch information
nitin-ebi committed Jan 24, 2024
1 parent 3fcd322 commit f227b2e
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import uk.ac.ebi.eva.contigalias.entities.ChromosomeEntity;
import uk.ac.ebi.eva.contigalias.entitygenerator.AssemblyGenerator;
import uk.ac.ebi.eva.contigalias.entitygenerator.ChromosomeGenerator;
import uk.ac.ebi.eva.contigalias.repo.ChromosomeRepository;

import java.util.Collections;
import java.util.List;
Expand All @@ -47,14 +48,18 @@ public class ChromosomeServiceIntegrationTest {
@Autowired
private ChromosomeService service;

@Autowired
private ChromosomeRepository chromosomeRepository;

@BeforeEach
void setup() {
chromosomeRepository.deleteAll();
service.insertChromosome(entity);
}

@AfterEach
void tearDown() {
service.deleteChromosome(entity);
chromosomeRepository.deleteAll();
}

@Test
Expand Down

0 comments on commit f227b2e

Please sign in to comment.