• Views
  • Iteration Report
  • My Iteration Report
  •  
OMERO.server
  • Login
  • Help/Guide
  • About Trac
  • Preferences
  • Wiki
  • Timeline
  • Roadmap
  • Browse Source
  • View Tickets
  • Search

Context Navigation

  • ← Previous Change
  • Next Change →

Changeset 1597 for branches/3.0-Beta2/components/romio/test/ome/io/nio/utests/DeltaVisionTest.java

Show
Ignore:
Timestamp:
06/05/07 22:57:10 (18 months ago)
Author:
david
Message:

testNG tests run in Eclipse but not using terminal, will remove if this commit does not work, strange behavior

Files:
1 modified

  • branches/3.0-Beta2/components/romio/test/ome/io/nio/utests/DeltaVisionTest.java (modified) (6 diffs)

Legend:

Unmodified
Added
Removed
  • branches/3.0-Beta2/components/romio/test/ome/io/nio/utests/DeltaVisionTest.java

    r1596 r1597  
    3232public class DeltaVisionTest extends TestCase { 
    3333 
    34         OriginalFile originalFile; 
     34        private OriginalFile originalFile; 
    3535 
    36         DeltaVision deltaVision; 
     36        private DeltaVision deltaVision; 
    3737 
    3838        private static int setupCount = 0; 
    39         private transient static Log log = LogFactory.getLog(DeltaVisionTest.class); 
    40  
     39        //private transient static Log log = LogFactory.getLog(DeltaVisionTest.class); 
     40         
    4141        @Configuration(beforeTestMethod = true) 
    42         protected void setUp() throws Exception { 
     42        protected void setUp() { 
    4343 
    4444                setupCount++; 
    … …  
    5050                        originalFile = new OriginalFile(); 
    5151                        URL url = getClass().getResource("tinyTest.d3d.dv"); 
     52                        try { 
     53                                File file = new File(url.toURI()); 
     54                                originalFile.setPath(file.getAbsolutePath()); 
     55                                deltaVision = new DeltaVision(originalFile, true); 
     56                        } catch (Exception ex) { 
     57                                ex.printStackTrace(); 
     58                        } 
    5259                         
    53                         File file = new File(url.toURI()); 
    54                         originalFile.setPath(file.getAbsolutePath()); 
    55                         deltaVision = new DeltaVision(originalFile, true); 
    56                         DeltaVisionHeader header = deltaVision.getHeader(); 
    57                          
    58                          
    59                         log.info("Size X = " + header.getSizeX()); 
    60                         log.info("Size Y = " + header.getSizeY()); 
    61                         log.info("Size Z = " + header.getSizeZ()); 
    62                         log.info("Size C = " + header.getSizeC()); 
    63                         log.info("Size T = " + header.getSizeT()); 
    64  
    65                          
    66                          
    67                         log.info(deltaVision.getPath()); 
    68                         log.info("Row size = " + new Integer(deltaVision.getRowSize()).intValue()); 
    69                         log.info("Stack size = " + new Integer(deltaVision.getStackSize()).intValue()); 
    70                         log.info("Plane size = " + new Integer(deltaVision.getPlaneSize()).intValue()); 
    71                          
    72                         log.info(deltaVision.calculateMessageDigest().toString()); 
    73                         log.info("Timepoint size = " + deltaVision.getTimepointSize()); 
    74                         log.info("Total size = " + deltaVision.getTotalSize().toString()); 
    75                          
    76                         log.info("ImageSequence = (should be 0=ZTC) " + deltaVision.getHeader().getSequence()); 
     60//                      log.info("Size X = " + header.getSizeX()); 
     61//                      log.info("Size Y = " + header.getSizeY()); 
     62//                      log.info("Size Z = " + header.getSizeZ()); 
     63//                      log.info("Size C = " + header.getSizeC()); 
     64//                      log.info("Size T = " + header.getSizeT()); 
     65// 
     66//                       
     67//                       
     68//                      log.info(deltaVision.getPath()); 
     69//                      log.info("Row size = " + new Integer(deltaVision.getRowSize()).intValue()); 
     70//                      log.info("Stack size = " + new Integer(deltaVision.getStackSize()).intValue()); 
     71//                      log.info("Plane size = " + new Integer(deltaVision.getPlaneSize()).intValue()); 
     72//                       
     73//                      log.info(deltaVision.calculateMessageDigest().toString()); 
     74//                      log.info("Timepoint size = " + deltaVision.getTimepointSize()); 
     75//                      log.info("Total size = " + deltaVision.getTotalSize().toString()); 
     76//                       
     77//                      log.info("ImageSequence = (should be 0=ZTC) " + deltaVision.getHeader().getSequence()); 
    7778 
    7879                } 
    … …  
    8081 
    8182        @Configuration(afterTestMethod = true) 
    82         protected void tearDown() throws Exception { 
     83        protected void tearDown() { 
    8384                if (setupCount == 12) { 
     85                        originalFile = null; 
    8486                        deltaVision = null; 
    85                         originalFile = null; 
    8687                } 
    8788        } 
    88  
     89         
    8990        @Test 
    9091        public void testGetSizeX() throws Exception { 
    … …  
    115116                int result = deltaVision.getSizeT(); 
    116117                assertTrue(result == 6); 
    117         } 
    118          
    119         public void testGetPath() throws Exception { 
    120                 String path = deltaVision.getPath(); 
    121                 assertTrue(path.equals("/OMERO/tinyTest.d3d.dv")); 
    122118        } 
    123119         
    … …  
    157153        public void testGetPlaneIndex() throws Exception { 
    158154                Long result = deltaVision.getPlaneOffset(2, 0, 3); // (2,0,3) plane 17 ? 
    159                 log.info("Plane offset = " + result.intValue()); 
     155                //log.info("Plane offset = " + result.intValue()); 
    160156                // should be 17 * planeSize=800 = 13600 
    161157                assertTrue(result.equals(new Long(13600))); 
    … …  
    165161        public void testGetStackIndex() throws Exception { 
    166162                Long result = deltaVision.getStackOffset(0, 2); 
    167                 log.info("Stack offset = " + result.intValue()); 
     163                //log.info("Stack offset = " + result.intValue()); 
    168164                // should be 2 * stackSize=4000 = 8000 
    169165                assertTrue(result.equals(new Long(8000))); 
    170166        } 
     167         
     168         
     169//      public void testGetRowIndex() throws Exception { 
     170//              Long result = deltaVision.getRowOffset(10, 2, 0, 3); // row 170 * rowsize 
     171//              log.info("Row offset = " + result.intValue()); 
     172//              assertTrue(result.equals(new Long(6800))); 
     173//               
     174//      } 
    171175} 

Download in other formats:

  • Unified Diff
  • Zip Archive

Trac Powered

Powered by Trac 0.11
By Edgewall Software.

Visit the Trac open source project at
http://trac.edgewall.org/