Cas update
This commit is contained in:
@ -1,5 +1,7 @@
|
||||
package com.plannaplan.security;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
@ -14,8 +16,25 @@ public class CasValidatorTest {
|
||||
try {
|
||||
System.out.println(validator.validate());
|
||||
} catch (Exception e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
assertTrue(false);
|
||||
}
|
||||
}
|
||||
|
||||
@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");
|
||||
try {
|
||||
assertTrue(validator.validate().trim().equals(""));
|
||||
}
|
||||
catch (CasValidationExcepiton e){
|
||||
assertTrue(true);
|
||||
}
|
||||
catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
assertTrue(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user