Update lambda tests

Update lambda tests for new and altered lambdas
This commit is contained in:
NMerz
2020-11-01 12:46:03 -05:00
parent aeb6433a87
commit a12b1ae870
4 changed files with 114 additions and 7 deletions

View File

@@ -1,14 +1,17 @@
import org.junit.Test;
import java.nio.file.NoSuchFileException;
import java.sql.SQLException;
public class TestUserDeleter {
@Test
public void TestUserDelete(){
try {
testUserDeleter(false);
assert(false);
} catch (Exception e) {}
public void testUserDeleteFileUsage(){
testUserDeleter(false);
}
@Test
public void testUserDeleteInvalid(){
testUserDeleter(true);
}
public void testUserDeleter(boolean shouldThrow) {
@@ -24,7 +27,9 @@ public class TestUserDeleter {
try {
userDeleter.conductAction(null, null, cognitoID);
} catch (SQLException e) {
e.printStackTrace();
assert shouldThrow;
} catch (Exception e) {
assert e.getClass().equals(NoSuchFileException.class);
}
}
}