Skip to content

Commit

Permalink
Remove us.freeandfair.corla.util.TestClassWithDatabase; change all te…
Browse files Browse the repository at this point in the history
…sts to use DD's version.
  • Loading branch information
vteague committed Dec 24, 2024
1 parent e644191 commit 94dcb4b
Show file tree
Hide file tree
Showing 14 changed files with 17 additions and 121 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@
* This class is designed to be extended by any test class that needs to interact with a test
* instantiation of the colorado-rla database. It provides convenience methods for instantiating
* a postgres container (initialised with one a given SQL script) and hibernate properties.
* Database configuration properties are loaded from test.properties, except that the Hibernate URL
* is overridden with the test container's URL.
* Important gotcha: although you can extend this class and write a new @BeforeClass method, which
* will be executed after any @BeforeClass methods in this class, you *must* give the method a new
* name - otherwise it seems to silently not run.
*/
public abstract class TestClassWithDatabase {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import org.hibernate.Session;
import us.freeandfair.corla.query.CastVoteRecordQueries;
import us.freeandfair.corla.query.Setup;
import us.freeandfair.corla.util.TestClassWithDatabase;
import au.org.democracydevelopers.corla.util.TestClassWithDatabase;

@Test(groups = {"integration"})
public class BallotSelectionTest extends TestClassWithDatabase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import us.freeandfair.corla.model.CountyDashboard;
import us.freeandfair.corla.persistence.Persistence;
import us.freeandfair.corla.query.Setup;
import us.freeandfair.corla.util.TestClassWithDatabase;
import au.org.democracydevelopers.corla.util.TestClassWithDatabase;

import java.util.Properties;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import org.testng.annotations.Test;
import us.freeandfair.corla.persistence.Persistence;
import us.freeandfair.corla.util.TestClassWithDatabase;
import au.org.democracydevelopers.corla.util.TestClassWithDatabase;

import java.time.Clock;
import java.time.Instant;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package us.freeandfair.corla.model;

import org.testng.annotations.Test;
import us.freeandfair.corla.util.TestClassWithDatabase;
import au.org.democracydevelopers.corla.util.TestClassWithDatabase;

import java.lang.reflect.Array;
import java.time.Instant;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

import us.freeandfair.corla.csv.ContestNameParser;
import us.freeandfair.corla.json.VersionExclusionStrategy;
import us.freeandfair.corla.util.TestClassWithDatabase;
import au.org.democracydevelopers.corla.util.TestClassWithDatabase;

public class AuditInfoTest extends TestClassWithDatabase {
public Gson gson;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import us.freeandfair.corla.model.Administrator;
import us.freeandfair.corla.model.County;
import us.freeandfair.corla.persistence.Persistence;
import us.freeandfair.corla.util.TestClassWithDatabase;
import au.org.democracydevelopers.corla.util.TestClassWithDatabase;

import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertNull;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import org.testng.annotations.*;
import us.freeandfair.corla.model.*;
import us.freeandfair.corla.persistence.Persistence;
import us.freeandfair.corla.util.TestClassWithDatabase;
import au.org.democracydevelopers.corla.util.TestClassWithDatabase;

import javax.swing.text.html.Option;
import java.util.*;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import us.freeandfair.corla.model.*;
import us.freeandfair.corla.persistence.Persistence;
import us.freeandfair.corla.query.Setup;
import us.freeandfair.corla.util.TestClassWithDatabase;
import au.org.democracydevelopers.corla.util.TestClassWithDatabase;

@Test(groups = {"integration"})
public class CastVoteRecordQueriesTest extends TestClassWithDatabase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import us.freeandfair.corla.model.ComparisonAudit;
import us.freeandfair.corla.model.ContestResult;
import us.freeandfair.corla.persistence.Persistence;
import us.freeandfair.corla.util.TestClassWithDatabase;
import au.org.democracydevelopers.corla.util.TestClassWithDatabase;

import java.math.BigDecimal;
import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import us.freeandfair.corla.model.*;
import us.freeandfair.corla.model.Choice;
import us.freeandfair.corla.persistence.Persistence;
import us.freeandfair.corla.util.TestClassWithDatabase;
import au.org.democracydevelopers.corla.util.TestClassWithDatabase;

import java.awt.*;
import java.util.*;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import us.freeandfair.corla.model.ContestResult;
import us.freeandfair.corla.model.Contest;
import us.freeandfair.corla.model.County;
import us.freeandfair.corla.util.TestClassWithDatabase;
import au.org.democracydevelopers.corla.util.TestClassWithDatabase;

@Test(groups = {"integration"})
public class ContestResultQueriesTest extends TestClassWithDatabase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@


import org.hibernate.Session;
import us.freeandfair.corla.util.TestClassWithDatabase;
import au.org.democracydevelopers.corla.util.TestClassWithDatabase;


@Test(groups = {"integration"})
Expand Down

This file was deleted.

0 comments on commit 94dcb4b

Please sign in to comment.