Skip to content

Commit

Permalink
Start from clean slate before every test to guarantee predictability
Browse files Browse the repository at this point in the history
  • Loading branch information
sundarvenkata committed Mar 20, 2020
1 parent 9943572 commit f77f0a9
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*/
package uk.ac.ebi.ampt2d.commons.accession.generators.monotonic;

import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
Expand Down Expand Up @@ -67,6 +68,11 @@ public class MonotonicAccessionGeneratorTest {
@Autowired
private ContiguousIdBlockService service;

@Before
public void initializeBlocks() {
repository.deleteAll();
}

@Test
public void assertNoBlockGeneratedAtLoadIfNoneExists() throws Exception {
MonotonicAccessionGenerator generator = getMonotonicAccessionGenerator();
Expand Down

0 comments on commit f77f0a9

Please sign in to comment.