mirror of
https://github.com/ClaytonWWilson/Listify.git
synced 2026-03-10 18:55:03 +00:00
Fixed failing tests
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import org.junit.Test;
|
||||
import org.mockito.Mockito;
|
||||
|
||||
import java.security.AccessControlException;
|
||||
import java.sql.SQLException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@@ -9,12 +10,12 @@ public class TestListDuplicate {
|
||||
|
||||
@Test
|
||||
public void testListDuplicateValid() {
|
||||
testListDuplicaterMock(false);
|
||||
testListDuplicaterMock(true);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testListDuplicateError() {
|
||||
testListDuplicaterMock(true);
|
||||
testListDuplicaterMock(false);
|
||||
}
|
||||
|
||||
public void testListDuplicaterMock(boolean shouldThrow) {
|
||||
@@ -38,6 +39,9 @@ public class TestListDuplicate {
|
||||
} catch (SQLException throwables) {
|
||||
assert shouldThrow;
|
||||
throwables.printStackTrace();
|
||||
} catch(AccessControlException throwables) {
|
||||
assert !shouldThrow;
|
||||
throwables.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user