Produced by Araxis Merge on 2/4/2019 11:34:04 AM Eastern 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 | MHPRO_v1.x.zip\mhpro-resources-master@a26412b610c.zip\ws\src\test\java\gov\va\mobile\vamf\mhpro\datalayer | AssignmentRespositoryTest.java | Tue Nov 14 19:31:17 2017 UTC |
| 2 | MHPRO_v1.x.zip\mhpro-resources-master@a26412b610c.zip\ws\src\test\java\gov\va\mobile\vamf\mhpro\datalayer | AssignmentRespositoryTest.java | Mon Feb 4 15:13:47 2019 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 198 |
| 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 | package go v.va.mobil e.vamf.mhp ro.datalay er; | |
| 2 | ||
| 3 | import sta tic org.ju nit.Assert .assertNot Null; | |
| 4 | import sta tic org.ju nit.Assert .assertTru e; | |
| 5 | ||
| 6 | import jav a.util.Arr ays; | |
| 7 | import jav a.util.Set ; | |
| 8 | import jav a.util.Lis t; | |
| 9 | ||
| 10 | import jav ax.validat ion.constr aints.Asse rtTrue; | |
| 11 | ||
| 12 | import org .joda.time .DateTime; | |
| 13 | import org .junit.Aft er; | |
| 14 | import org .junit.Bef ore; | |
| 15 | import org .junit.Tes t; | |
| 16 | import org .junit.run ner.RunWit h; | |
| 17 | import org .slf4j.Log ger; | |
| 18 | import org .slf4j.Log gerFactory ; | |
| 19 | import org .springfra mework.bea ns.factory .annotatio n.Autowire d; | |
| 20 | import org .springfra mework.tes t.context. ContextCon figuration ; | |
| 21 | import org .springfra mework.tes t.context. junit4.Spr ingJUnit4C lassRunner ; | |
| 22 | import org .springfra mework.tes t.context. web.WebApp Configurat ion; | |
| 23 | ||
| 24 | import gov .va.mobile .vamf.mhpr o.common.F requency; | |
| 25 | import gov .va.mobile .vamf.mhpr o.domain.A ssignment; | |
| 26 | import gov .va.mobile .vamf.mhpr o.domain.I ENAndStati onNumber; | |
| 27 | import gov .va.mobile .vamf.mhpr o.resource .AbstractM VCControll erTester; | |
| 28 | ||
| 29 | /** | |
| 30 | * | |
| 31 | * @author carlos.ru iz2@va.gov , PII | |
| 32 | * | |
| 33 | */ | |
| 34 | @RunWith(S pringJUnit 4ClassRunn er.class) | |
| 35 | @WebAppCon figuration | |
| 36 | @ContextCo nfiguratio n({ "class path:appli cationCont ext.xml", | |
| 37 | "c lasspath:d ispatcher- servlet.xm l", | |
| 38 | "c lasspath:m ongoContex t.xml"}) | |
| 39 | public cla ss Assignm entResposi toryTest { | |
| 40 | ||
| 41 | st atic Logge r log = Lo ggerFactor y.getLogge r(Assignme ntResposit oryTest.cl ass); | |
| 42 | pr ivate stat ic String assignment Id = "1234 567890"; | |
| 43 | ||
| 44 | @A utowired | |
| 45 | pr ivate Assi gnmentRepo sitory ass ignmentRep ository; | |
| 46 | ||
| 47 | @B efore | |
| 48 | pu blic void setUp() th rows Excep tion { | |
| 49 | Assi gnment ass ignment = new Assign ment(); | |
| 50 | assi gnment.set _id(assign mentId); | |
| 51 | assi gnment.set _whitelist Id("1234") ; | |
| 52 | assi gnment.set Completed( false); | |
| 53 | assi gnment.set VirtualDel eted(false ); | |
| 54 | assi gnment.set Assessment Name("GAD- 7"); | |
| 55 | assi gnment.set ClinicId(" 1234"); | |
| 56 | assi gnment.set ClinicName ("Clinic") ; | |
| 57 | assi gnment.set NumberOccu rrences(1) ; | |
| 58 | assi gnment.set PatientAss ignAuth("E DIPI"); | |
| 59 | assi gnment.set ProviderAs signAuth(" dfn-000"); | |
| 60 | assi gnment.set PatientId( "1"); | |
| 61 | assi gnment.set ProviderId ("2"); | |
| 62 | assi gnmentRepo sitory.ins ert(assign ment); | |
| 63 | } | |
| 64 | ||
| 65 | @A fter | |
| 66 | pu blic void tearDown() throws Ex ception { | |
| 67 | Assi gnment ass ignment = assignment Repository .findBy_id (assignmen tId); | |
| 68 | if ( assignment != null) { | |
| 69 | assign mentReposi tory.delet e(assignme nt); | |
| 70 | } | |
| 71 | ||
| 72 | } | |
| 73 | ||
| 74 | @T est | |
| 75 | pu blic void testAssign mentReposi torySaveAn dFindById( ) { | |
| 76 | Assi gnment ass ignment = new Assign ment(); | |
| 77 | Assi gnment res ult = assi gnmentRepo sitory.sav e(assignme nt); | |
| 78 | asse rtNotNull( result); | |
| 79 | Stri ng id = re sult.get_i d(); | |
| 80 | resu lt = assig nmentRepos itory.find By_id(id); | |
| 81 | asse rtNotNull( result); | |
| 82 | assi gnmentRepo sitory.del ete(id); | |
| 83 | } | |
| 84 | ||
| 85 | ||
| 86 | @T est | |
| 87 | pu blic void testFindUn iqueProvid erIDs() { | |
| 88 | Set< IENAndStat ionNumber> uniquePro viderIDs = assignmen tRepositor y.findUniq ueProvider IDs(); | |
| 89 | for (IENAndSta tionNumber n : uniqu eProviderI Ds) { | |
| 90 | log.in fo(n.getSt ationNumbe r() + ": " + n.getIE N()); | |
| 91 | } | |
| 92 | } | |
| 93 | ||
| 94 | @T est | |
| 95 | pu blic void testFindAc tiveAssign ments() th rows Excep tion { | |
| 96 | List <Assignmen t> assignm ents = ass ignmentRep ository.fi ndByPatien tAssignAut hAndPatien tIdAndAsse ssmentName AndVirtual DeletedAnd Completed( | |
| 97 | "EDIPI", "1","GAD- 7", false, false); | |
| 98 | asse rtTrue(ass ignments.s ize() == 1 ); | |
| 99 | } | |
| 100 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.