public void TestGetTileBadAdress()
 {
     MyAssert.Throws <ArgumentException>(() => dz.GetTile(0, new SizeL(-1, 0)));
     MyAssert.Throws <ArgumentException>(() => dz.GetTile(0, new SizeL(1, 0)));
 }
Beispiel #2
0
 public void TestOpen()
 {
     MyAssert.Throws <OpenSlideException>(() => new OpenSlide("does_not_exist"));
     MyAssert.Throws <OpenSlideException>(() => new OpenSlide("setup.py"));
     MyAssert.Throws <OpenSlideException>(() => new OpenSlide("tests/unopenable.tiff"));
 }
 public void TestGetTileBadLevel()
 {
     MyAssert.Throws <ArgumentException>(() => dz.GetTile(-1, new SizeL(0, 0)));
     MyAssert.Throws <ArgumentException>(() => dz.GetTile(10, new SizeL(0, 0)));
 }
Beispiel #4
0
 public void TestReadBadRegion()
 {
     Assert.AreEqual(osr.Properties["openslide.vendor"], "aperio");
     MyAssert.Throws <OpenSlideException>(() => osr.ReadRegion(new SizeL(0, 0), 0, new SizeL(16, 16)));
 }
Beispiel #5
0
 public void TestReadRegionBadSize()
 {
     MyAssert.Throws <OpenSlideException>(() => osr.ReadRegion(new SizeL(0, 0), 1, new SizeL(400, -5)));
 }
Beispiel #6
0
 public void TestReadRegionSizeDimensionZero()
 {
     MyAssert.Throws <ArgumentException>(() => osr.ReadRegion(new SizeL(0, 0), 0, new SizeL(400, 0)));
 }
Beispiel #7
0
 public void TestReadRegionBadLevel()
 {
     MyAssert.Throws <OpenSlideException>(() => osr.ReadRegion(new SizeL(0, 0), 1, new SizeL(100, 100)));
 }
Beispiel #8
0
 public void TestOpen()
 {
     MyAssert.Throws <IOException>(() => new ImageSlide("does_not_exist"));
     MyAssert.Throws <IOException>(() => new ImageSlide("setup.py"));
 }