1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.student.core.web;
17
18 import static org.junit.Assert.assertTrue;
19
20 import java.io.IOException;
21 import java.net.MalformedURLException;
22
23 import org.junit.Test;
24
25 import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException;
26
27 public class TestLogIn {
28
29 Page page;
30
31 @Test
32 public void loadPage() throws FailingHttpStatusCodeException, MalformedURLException, IOException{
33 page = new Page("http://localhost:8181/ks-core-web/spring_security_login");
34 assertTrue(page.getPage().getTitleText().equals("Login Page"));
35 }
36
37 @Test
38 public void testLogIn() throws FailingHttpStatusCodeException, MalformedURLException, IOException{
39 Page toLogIn = new Page("http://localhost:8181/ks-core-web/spring_security_login");
40 toLogIn.logIn("same", "same");
41 assertTrue(toLogIn.getPage().getTitleText().contains("Kuali Student: Organization"));
42 }
43
44 }