Produced by Araxis Merge on 7/6/2017 8:22:51 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 | OSCIF_CTT_v4_build 1.zip\ISAAC-file-transfer-utils\src\test\java\gov\vha\isaac\utils\file_transfer | FileTransferTest.java | Wed May 31 03:58:42 2017 UTC |
| 2 | OSCIF_CTT_v4_build 1.zip\ISAAC-file-transfer-utils\src\test\java\gov\vha\isaac\utils\file_transfer | FileTransferTest.java | Mon Jul 3 21:53:55 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 158 |
| 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.vha.isaa c.utils.fi le_transfe r; | |
| 2 | ||
| 3 | import jav a.net.Malf ormedURLEx ception; | |
| 4 | ||
| 5 | import jun it.framewo rk.Test; | |
| 6 | import jun it.framewo rk.TestCas e; | |
| 7 | import jun it.framewo rk.TestSui te; | |
| 8 | ||
| 9 | /** | |
| 10 | * Unit te st for sim ple App. | |
| 11 | */ | |
| 12 | public cla ss FileTra nsferTest | |
| 13 | extends Te stCase | |
| 14 | { | |
| 15 | /* * | |
| 16 | * Create th e test cas e | |
| 17 | * | |
| 18 | * @param te stName nam e of the t est case | |
| 19 | * / | |
| 20 | pu blic FileT ransferTes t( String testName ) | |
| 21 | { | |
| 22 | supe r( testNam e ); | |
| 23 | } | |
| 24 | ||
| 25 | /* * | |
| 26 | * @return t he suite o f tests be ing tested | |
| 27 | * / | |
| 28 | pu blic stati c Test sui te() | |
| 29 | { | |
| 30 | retu rn new Tes tSuite( Fi leTransfer Test.class ); | |
| 31 | } | |
| 32 | ||
| 33 | // pr ivate stat ic String convertStr eamToStrin g(java.io. InputStrea m is) { | |
| 34 | // java .util.Scan ner s = ne w java.uti l.Scanner( is); | |
| 35 | // java .util.Scan ner withDe limiter = s.useDelim iter("\\A" ); | |
| 36 | // Stri ng result = withDeli miter.hasN ext() ? wi thDelimite r.next() : ""; | |
| 37 | // s.cl ose(); | |
| 38 | // | |
| 39 | // retu rn result; | |
| 40 | // } | |
| 41 | ||
| 42 | // pr ivate Conf ig getEffe ctiveConfi g(String r esourceFil eBaseName) { | |
| 43 | // Inpu tStream in = this.ge tClass().g etClassLoa der().getR esourceAsS tream(reso urceFileBa seName); | |
| 44 | // Stri ng jsonInS tring = co nvertStrea mToString( in); | |
| 45 | // | |
| 46 | // Obje ctMapper m apper = ne w ObjectMa pper(); | |
| 47 | // | |
| 48 | // Conf ig objFrom JSon = nul l; | |
| 49 | // try { | |
| 50 | // //JSON from file to Object | |
| 51 | // //Conf ig obj = m apper.read Value(new File("c:\\ configfile .json"), C onfig.clas s); | |
| 52 | // | |
| 53 | // //JSON from Stri ng to Conf ig Object | |
| 54 | // objFro mJSon = ma pper.readV alue(jsonI nString, C onfig.clas s); | |
| 55 | // System .out.print ln("Read f ile-transf er cfg jso n from fil e: " + obj FromJSon); | |
| 56 | // } ca tch (IOExc eption e) { | |
| 57 | // System .err.print ln("Failed serializi ng object. Caught " + e.getCla ss().getCl ass().getN ame() + " " + e.getL ocalizedMe ssage()); | |
| 58 | // e.prin tStackTrac e(); | |
| 59 | // Assert .fail("Fai led serial izing obje ct. Caught " + e.get Class().ge tClass().g etName() + " " + e.g etLocalize dMessage() ); | |
| 60 | // } | |
| 61 | // | |
| 62 | // Conf ig effecti veConfigFr omConfigFr omJSon = C onfig.getE ffectiveCo nfig(objFr omJSon); | |
| 63 | // | |
| 64 | // Syst em.out.pri ntln("Read effective file-tran sfer cfg j son from f ile: " + e ffectiveCo nfigFromCo nfigFromJS on); | |
| 65 | // | |
| 66 | // retu rn effecti veConfigFr omConfigFr omJSon; | |
| 67 | // } | |
| 68 | ||
| 69 | /* * | |
| 70 | * Rigourous Test :-) | |
| 71 | * @throws E xception | |
| 72 | * @throws M alformedUR LException | |
| 73 | * / | |
| 74 | pu blic void testAppSma ll() throw s Malforme dURLExcept ion, Excep tion | |
| 75 | { | |
| 76 | //Co nfig effec tiveConfig FromConfig FromJSon = getEffect iveConfig( "file-tran sfer-test- release-sm all.cfg"); | |
| 77 | ||
| 78 | //FileTran sfer.downl oad(effect iveConfigF romConfigF romJSon, " http:// URL . DNS : PORT /", "devte st", "devt est"); | |
| 79 | } | |
| 80 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.