示例#1
0
 @Test
 public void testSetTransparency() {
   gridScanMap.setTransparency(10);
   int t = gridScanMap.getTransparency();
   assertEquals(10, t);
   gridScanMap.setTransparency(-1);
   t = gridScanMap.getTransparency();
   assertEquals(-1, t);
 }
示例#2
0
 @Test
 public void testGetSpectrum() {
   IDataset spectrum = gridScanMap.getSpectrum(0, 0);
   Dataset d = DatasetUtils.convertToDataset(spectrum);
   assertEquals(d.getElementDoubleAbs(0), 0, 0);
   assertEquals(d.getElementDoubleAbs(d.getSize() - 1), d.getSize() - 1, 0);
 }
示例#3
0
 @Ignore
 @Test
 public void testMakeNewMapWithParent() {
   DoubleDataset rand = Random.rand(gridScanMap.getMap().getShape());
   AxesMetadata ax = gridScanMap.getMap().getFirstMetadata(AxesMetadata.class);
   MetadataType clone = ax.clone();
   rand.setMetadata(clone);
   MappedData map =
       gridScanMap.makeNewMapWithParent("random", Random.rand(gridScanMap.getMap().getShape()));
   assertEquals(gridScanBlock, map.getParent());
 }
示例#4
0
 @Test
 public void testGetChildren() {
   assertNull(gridScanMap.getChildren());
 }
示例#5
0
 @Test
 public void testHasChildren() {
   assertFalse(gridScanMap.hasChildren());
 }
示例#6
0
 @Test
 public void testGetData() {
   IDataset d = gridScanMap.getMap();
   assertNotNull(d);
 }
示例#7
0
 @Test
 public void testIsLive() {
   assertFalse(gridScanMap.isLive());
 }
示例#8
0
 @Test
 public void testGetLongName() {
   assertEquals(
       file.getAbsolutePath() + " : " + MapNexusFileBuilderUtils.SUM_PATH,
       gridScanMap.getLongName());
 }
示例#9
0
 @Test
 public void testGetRange() {
   double[] range = gridScanMap.getRange();
   assertArrayEquals(new double[] {-0.5, 10.5, -0.5, 9.5}, range, 1);
 }
示例#10
0
 @Test
 public void testGetParent() {
   assertEquals(gridScanBlock, gridScanMap.getParent());
 }
示例#11
0
 @Test
 public void testGetTransparency() {
   int t = gridScanMap.getTransparency();
   assertEquals(-1, t);
 }