Produced by Araxis Merge on 11/9/2017 4:31:05 PM Central Standard Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
# | Location | File | Last Modified |
---|---|---|---|
1 | PPS-N_B397.zip\PPS-N_B397\PPS-N_B397\PS_PPS_ui\src\test\java\gov\va\med\pharmacy\peps\presentation\common\auth | PpsAuthenticationTest.java | Thu Nov 9 15:03:04 2017 UTC |
2 | PPS-N_B397.zip\PPS-N_B397\PPS-N_B397\PS_PPS_ui\src\test\java\gov\va\med\pharmacy\peps\presentation\common\auth | PpsAuthenticationTest.java | Thu Nov 9 20:07:04 2017 UTC |
Description | Between Files 1 and 2 |
|
---|---|---|
Text Blocks | Lines | |
Unchanged | 4 | 124 |
Changed | 3 | 8 |
Inserted | 0 | 0 |
Removed | 0 | 0 |
Whitespace | |
---|---|
Character case | Differences in character case are significant |
Line endings | Differences in line endings (CR and LF characters) are ignored |
CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
1 | package go v.va.med.p harmacy.pe ps.present ation.comm on.auth; | |
2 | ||
3 | import sta tic org.ha mcrest.Cor eMatchers. *; | |
4 | import sta tic org.ju nit.Assert .*; | |
5 | ||
6 | import org .junit.Tes t; | |
7 | import org .springfra mework.moc k.web.Mock HttpServle tRequest; | |
8 | ||
9 | /** | |
10 | * Unit te sts for {@ link PpsAu thenticati on}. | |
11 | */ | |
12 | public cla ss PpsAuth entication Test { | |
13 | ||
14 | @Test | |
15 | public void test GetLogoutT argetUrl_V alidLandin g() { | |
16 | ||
17 | /* Setup */ | |
18 | final Stri ng landing Url = "htt ps://foo. DNS /landing.a spx"; | |
19 | final Stri ng logoutU rl = "http s://foo. DNS /logout.as px"; | |
20 | ||
21 | Mo ckHttpServ letRequest request = new MockH ttpServlet Request(); | |
22 | re quest.addH eader(Ssoi Header.SSO I_LANDING_ URL.getHea derName(), landingUr l); | |
23 | re quest.addH eader(Ssoi Header.SSO I_LOGGEDOU T_URL.getH eaderName( ), logoutU rl); | |
24 | ||
25 | /* Behavior & Verifica tion */ | |
26 | as sertThat(P psAuthenti cation.get LogoutTarg etUrl(requ est), equa lTo(landin gUrl)); | |
27 | } | |
28 | ||
29 | @Test | |
30 | public void test GetLogoutT argetUrl_I nvalidLand ing() { | |
31 | ||
32 | /* Setup */ | |
33 | fi nal String landingUr l = "https ://www.goo gle.com/la nding.aspx "; | |
34 | final Stri ng logoutU rl = "http s://foo. DNS /logout.as px"; | |
35 | ||
36 | Mo ckHttpServ letRequest request = new MockH ttpServlet Request(); | |
37 | re quest.addH eader(Ssoi Header.SSO I_LANDING_ URL.getHea derName(), landingUr l); | |
38 | re quest.addH eader(Ssoi Header.SSO I_LOGGEDOU T_URL.getH eaderName( ), logoutU rl); | |
39 | ||
40 | /* Behavior & Verifica tion */ | |
41 | as sertThat(P psAuthenti cation.get LogoutTarg etUrl(requ est), equa lTo(logout Url)); | |
42 | } | |
43 | ||
44 | @Test | |
45 | public void test GetLogoutT argetUrl_N oLanding() { | |
46 | ||
47 | /* Setup */ | |
48 | final Stri ng logoutU rl = "http s://foo. DNS /logout.as px"; | |
49 | ||
50 | Mo ckHttpServ letRequest request = new MockH ttpServlet Request(); | |
51 | re quest.addH eader(Ssoi Header.SSO I_LOGGEDOU T_URL.getH eaderName( ), logoutU rl); | |
52 | ||
53 | /* Behavior & Verifica tion */ | |
54 | as sertThat(P psAuthenti cation.get LogoutTarg etUrl(requ est), equa lTo(logout Url)); | |
55 | } | |
56 | ||
57 | @Test | |
58 | public void test GetLogoutT argetUrl_D efault() { | |
59 | /* Setup */ | |
60 | Mo ckHttpServ letRequest request = new MockH ttpServlet Request(); | |
61 | ||
62 | /* Behavior & Verifica tion */ | |
63 | as sertNull(P psAuthenti cation.get LogoutTarg etUrl(requ est)); | |
64 | } | |
65 | ||
66 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.