public void MakeSureYouCannotReadTooMuchDataFromDisk() { VirtualDisk virtualDisk = VirtualDiskTestFactory.ConstructDefaultTestDisk(); ExceptionAssert.MakeSureExceptionIsRaisedBy <ArgumentException>( delegate() { virtualDisk.ReadBytesFromBlock(0, 0, virtualDisk.BlockSizeInBytes + 1); }); ExceptionAssert.MakeSureExceptionIsRaisedBy <ArgumentException>( delegate() { virtualDisk.ReadBytesFromBlock(0, 3, virtualDisk.BlockSizeInBytes - 2); }); ExceptionAssert.MakeSureExceptionIsRaisedBy <ArgumentException>( delegate() { virtualDisk.ReadBytesFromBlock(0, int.MaxValue, 0); }); ExceptionAssert.MakeSureExceptionIsRaisedBy <ArgumentException>( delegate() { virtualDisk.ReadBytesFromBlock(0, 0, int.MaxValue); }); }