Small test fixc

This commit is contained in:
Filip Izydorczyk
2020-09-24 17:46:35 +02:00
parent 3d1269037b
commit 305b86945d
2 changed files with 5 additions and 10 deletions

View File

@ -10,7 +10,8 @@ public class CasValidatorTest {
@Test
@Ignore
public void shouldValidateTicket() {
//you need to privide fresh ticket to make this test pass that's why it is marked as ignored
// you need to privide fresh ticket to make this test pass that's why it is
// marked as ignored
CasValidator validator = new CasValidator("http://localhost:3000",
"ST-572267-cbgKrcJLd0tdCubeLqdW-cas.amu.edu.pl");
try {
@ -23,16 +24,12 @@ public class CasValidatorTest {
@Test
public void shouldNotValidateTicket() {
//you need to privide fresh ticket to make this test pass that's why it is marked as ignored
CasValidator validator = new CasValidator("http://localhost:3000",
"notticket");
CasValidator validator = new CasValidator("http://localhost:3000", "notticket");
try {
assertTrue(validator.validate().trim().equals(""));
}
catch (CasValidationExcepiton e){
} catch (CasValidationExcepiton e) {
assertTrue(true);
}
catch (Exception e) {
} catch (Exception e) {
e.printStackTrace();
assertTrue(false);
}