Produced by Araxis Merge on 7/10/2017 1:01:44 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\IV-ehmp_cif\ImagingCommon\main\test\java\gov\va\med\imaging\channels | ChecksumValueTest.java | Thu Jun 29 17:22:55 2017 UTC |
| 2 | C:\AraxisMergeCompare\Pri_re\IV-ehmp_cif\ImagingCommon\main\test\java\gov\va\med\imaging\channels | ChecksumValueTest.java | Thu Jul 6 15:02:48 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 166 |
| 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.i maging.cha nnels; | |
| 5 | ||
| 6 | import jav a.beans.XM LDecoder; | |
| 7 | import jav a.beans.XM LEncoder; | |
| 8 | import jav a.io.*; | |
| 9 | import jav a.math.Big Integer; | |
| 10 | import jav a.nio.Char Buffer; | |
| 11 | ||
| 12 | import gov .va.med.im aging.chan nels.excep tions.Chec ksumFormat Exception; | |
| 13 | import jun it.framewo rk.TestCas e; | |
| 14 | ||
| 15 | /** | |
| 16 | * @author
|
|
| 17 | * | |
| 18 | */ | |
| 19 | public cla ss Checksu mValueTest extends T estCase | |
| 20 | { | |
| 21 | ||
| 22 | /* (non-Java doc) | |
| 23 | * @see juni t.framewor k.TestCase #setUp() | |
| 24 | * / | |
| 25 | pr otected vo id setUp() throws Ex ception | |
| 26 | { | |
| 27 | supe r.setUp(); | |
| 28 | } | |
| 29 | ||
| 30 | /* (non-Java doc) | |
| 31 | * @see juni t.framewor k.TestCase #tearDown( ) | |
| 32 | * / | |
| 33 | pr otected vo id tearDow n() throws Exception | |
| 34 | { | |
| 35 | supe r.tearDown (); | |
| 36 | } | |
| 37 | ||
| 38 | pu blic void testSerial ization() | |
| 39 | th rows IOExc eption, Ch ecksumForm atExceptio n, ClassNo tFoundExce ption | |
| 40 | { | |
| 41 | seri alizeDeser ializeAndC ompare( ne w Checksum Value("Adl er32", Big Integer.va lueOf(1L)) ); | |
| 42 | seri alizeDeser ializeAndC ompare( ne w Checksum Value("Adl er32", Big Integer.va lueOf(6553 21L)) ); | |
| 43 | seri alizeDeser ializeAndC ompare( ne w Checksum Value("Adl er32", Big Integer.va lueOf(-991 89729812L) ) ); | |
| 44 | seri alizeDeser ializeAndC ompare( ne w Checksum Value("Adl er32", Big Integer.va lueOf(0L)) ); | |
| 45 | seri alizeDeser ializeAndC ompare( ne w Checksum Value("Adl er32", Big Integer.va lueOf(8768 73276L)) ) ; | |
| 46 | ||
| 47 | seri alizeDeser ializeAndC ompare( ne w Checksum Value("CRC 32", BigIn teger.valu eOf(1L)) ) ; | |
| 48 | seri alizeDeser ializeAndC ompare( ne w Checksum Value("CRC 32", BigIn teger.valu eOf(655321 L)) ); | |
| 49 | seri alizeDeser ializeAndC ompare( ne w Checksum Value("CRC 32", BigIn teger.valu eOf(-99189 729812L)) ); | |
| 50 | seri alizeDeser ializeAndC ompare( ne w Checksum Value("CRC 32", BigIn teger.valu eOf(0L)) ) ; | |
| 51 | seri alizeDeser ializeAndC ompare( ne w Checksum Value("CRC 32", BigIn teger.valu eOf(876873 276L)) ); | |
| 52 | } | |
| 53 | ||
| 54 | /* * | |
| 55 | * @param cv | |
| 56 | * @throws I OException | |
| 57 | * @throws C hecksumFor matExcepti on | |
| 58 | * @throws C lassNotFou ndExceptio n | |
| 59 | * / | |
| 60 | pr ivate void serialize Deserializ eAndCompar e(Checksum Value cv) | |
| 61 | th rows IOExc eption, Ch ecksumForm atExceptio n, ClassNo tFoundExce ption | |
| 62 | { | |
| 63 | Byte ArrayOutpu tStream ou t; | |
| 64 | Byte ArrayInput Stream in; | |
| 65 | Obje ctOutputSt ream objec tOut; | |
| 66 | Obje ctInputStr eam object In; | |
| 67 | Chec ksumValue clonedCv; | |
| 68 | ||
| 69 | out = new Byte ArrayOutpu tStream(25 6); | |
| 70 | obje ctOut = ne w ObjectOu tputStream (out); | |
| 71 | ||
| 72 | obje ctOut.writ eObject(cv ); | |
| 73 | ||
| 74 | in = new ByteA rrayInputS tream(out. toByteArra y()); | |
| 75 | obje ctIn = new ObjectInp utStream(i n); | |
| 76 | clon edCv = (Ch ecksumValu e)objectIn .readObjec t(); | |
| 77 | ||
| 78 | obje ctOut.clos e(); | |
| 79 | obje ctIn.close (); | |
| 80 | ||
| 81 | Syst em.out.pri ntln("Comp aring '" + cv.toStri ng() + "' to '" + cl onedCv.toS tring() + "' through [" + new String(out .toByteArr ay()) + "] ."); | |
| 82 | asse rtEquals(c v, clonedC v); | |
| 83 | } | |
| 84 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.