Produced by Araxis Merge on 4/2/2019 1:06:57 PM Central Daylight 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 | C:\AraxisMergeCompare\Pri_un\ARS_Backend\ars_app\src\test\java\gov\va\med\ars\integration | RfaiControllerIntegrationTest.java | Wed Mar 27 19:21:15 2019 UTC |
2 | C:\AraxisMergeCompare\Pri_re\ARS_Backend\ars_app\src\test\java\gov\va\med\ars\integration | RfaiControllerIntegrationTest.java | Thu Mar 28 17:51:12 2019 UTC |
Description | Between Files 1 and 2 |
|
---|---|---|
Text Blocks | Lines | |
Unchanged | 2 | 226 |
Changed | 1 | 2 |
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 | /** | |
2 | * | |
3 | */ | |
4 | package go v.va.med.a rs.integra tion; | |
5 | ||
6 | import sta tic org.ju nit.Assert .assertFal se; | |
7 | import sta tic org.ju nit.Assert .assertTru e; | |
8 | import sta tic org.sp ringframew ork.test.w eb.servlet .request.M ockMvcRequ estBuilder s.get; | |
9 | import sta tic org.sp ringframew ork.test.w eb.servlet .result.Mo ckMvcResul tHandlers. print; | |
10 | import sta tic org.sp ringframew ork.test.w eb.servlet .result.Mo ckMvcResul tMatchers. content; | |
11 | import sta tic org.sp ringframew ork.test.w eb.servlet .result.Mo ckMvcResul tMatchers. status; | |
12 | ||
13 | import jav a.math.Big Integer; | |
14 | ||
15 | import org .apache.lo gging.log4 j.LogManag er; | |
16 | import org .apache.lo gging.log4 j.Logger; | |
17 | import org .junit.Bef ore; | |
18 | import org .junit.Ign ore; | |
19 | import org .junit.Tes t; | |
20 | import org .junit.run ner.RunWit h; | |
21 | import org .springfra mework.bea ns.factory .annotatio n.Autowire d; | |
22 | import org .springfra mework.htt p.HttpStat us; | |
23 | import org .springfra mework.tes t.context. ActiveProf iles; | |
24 | import org .springfra mework.tes t.context. ContextCon figuration ; | |
25 | import org .springfra mework.tes t.context. TestProper tySource; | |
26 | import org .springfra mework.tes t.context. junit4.Spr ingJUnit4C lassRunner ; | |
27 | import org .springfra mework.tes t.context. web.WebApp Configurat ion; | |
28 | import org .springfra mework.tes t.web.serv let.MockMv c; | |
29 | import org .springfra mework.tes t.web.serv let.Result Actions; | |
30 | import org .springfra mework.tes t.web.serv let.setup. MockMvcBui lders; | |
31 | import org .springfra mework.web .context.W ebApplicat ionContext ; | |
32 | ||
33 | import gov .va.med.ar s.configur ation.AppC onfig; | |
34 | import gov .va.med.ar s.configur ation.spri ng.SpringM vcConfig; | |
35 | ||
36 | /** | |
37 | * @author
|
|
38 | * | |
39 | */ | |
40 | @WebAppCon figuration | |
41 | @RunWith(S pringJUnit 4ClassRunn er.class) | |
42 | @ContextCo nfiguratio n(classes = { AppCon fig.class, SpringMvc Config.cla ss }) | |
43 | @TestPrope rtySource( properties = {"arsPr opFileLoca tion = ./s rc/test/re sources/de velopment. properties "}) | |
44 | public cla ss RfaiCon trollerInt egrationTe st { | |
45 | pr ivate stat ic final L ogger logg er = LogMa nager.getL ogger(Rfai Controller Integratio nTest.clas s); | |
46 | ||
47 | @A utowired | |
48 | pr ivate WebA pplication Context wa c; | |
49 | pr ivate Mock Mvc mockMv c; | |
50 | ||
51 | @B efore | |
52 | pu blic void setup() { | |
53 | this .mockMvc = MockMvcBu ilders.web AppContext Setup(this .wac).buil d(); | |
54 | } | |
55 | ||
56 | @T est | |
57 | ||
58 | pu blic void test_getCl aim_Succes s() throws Exception { | |
59 | ||
60 | Resu ltActions s = mockMv c.perform( get("/api/ v1/populat eClaim/{cl aimIndex}" , new BigI nteger("10 242"))) | |
61 | .andDo(p rint()).an dExpect(st atus().isO k()) | |
62 | .andExpe ct(content ().content Type("appl ication/js on;charset =UTF-8")); | |
63 | ||
64 | logg er.info("t estGetClai ms_Success :" + s.and Return().g etResponse ().getStat us()); | |
65 | asse rtFalse(Ht tpStatus.O K.value() != s.andRe turn().get Response() .getStatus ()); | |
66 | } | |
67 | ||
68 | @T est | |
69 | ||
70 | pu blic void testGetCla ims_LargeN umber_Fail ure() thro ws Excepti on { | |
71 | ||
72 | Resu ltActions s = mockMv c | |
73 | .perform (get("/api /v1/popula teClaim/{c laimIndex} ", new Big Integer("1 2345678910 111213"))) .andDo(pri nt()) | |
74 | .andExpe ct(status( ).is4xxCli entError() ); | |
75 | ||
76 | logg er.info("t estGetClai ms_Failure :" + s.and Return().g etResponse ().getStat us()); | |
77 | asse rtFalse(Ht tpStatus.O K.value() == s.andRe turn().get Response() .getStatus ()); | |
78 | } | |
79 | ||
80 | @T est | |
81 | ||
82 | pu blic void testGetPdi _Failure() throws Ex ception { | |
83 | ||
84 | Resu ltActions s = mockMv c.perform( get("/api/ v1/populat eClaim/{cl aimIndex}" , new BigI nteger("12 3456789101 112"))) | |
85 | .andDo(p rint()).an dExpect(st atus().is4 xxClientEr ror()); | |
86 | ||
87 | logg er.info("t estGetClai ms_Failure :" + s.and Return().g etResponse ().getStat us()); | |
88 | asse rtFalse(Ht tpStatus.O K.value() == s.andRe turn().get Response() .getStatus ()); | |
89 | } | |
90 | ||
91 | @T est | |
92 | ||
93 | pu blic void testGetPdi _Inappropr iate_Numbe r_Failure( ) throws E xception { | |
94 | ||
95 | Resu ltActions s = mockMv c.perform( get("/api/ v1/populat eClaim/{cl aimIndex}" , new BigI nteger("20 0617203000 180"))) | |
96 | .andDo(p rint()).an dExpect(st atus().is4 xxClientEr ror()); | |
97 | ||
98 | logg er.info("t estGetClai ms_Success :" + s.and Return().g etResponse ().getStat us()); | |
99 | asse rtFalse(Ht tpStatus.O K.value() == s.andRe turn().get Response() .getStatus ()); | |
100 | } | |
101 | ||
102 | @T est | |
103 | ||
104 | pu blic void testPendin gSubmissio n() throws Exception { | |
105 | ||
106 | Resu ltActions s = mockMv c | |
107 | .perform (get("/api /v1/popula teClaim/pe ndingSubmi ssion/{cla imIndex}", new BigIn teger("102 42"))) | |
108 | .andDo(p rint()).an dExpect(st atus().isO k()); | |
109 | ||
110 | logg er.info("t estPending Submission :" + s.and Return().g etResponse ().getStat us()); | |
111 | asse rtTrue(Htt pStatus.OK .value() = = s.andRet urn().getR esponse(). getStatus( )); | |
112 | } | |
113 | ||
114 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.