mirror of
https://github.com/ClaytonWWilson/Listify.git
synced 2026-03-11 02:55:04 +00:00
Merge pull request #171 from ClaytonWWilson/test-new-lambdas
Test new lambdas
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import org.junit.jupiter.api.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