public void TestFileBackedLessthanZeroLength() { ArgumentException expected = null; string filename = "testfile"; try { MemoryMappedFile mmf = MemoryMappedFile.CreateWithFileBacking(filename, true, -1); } catch (ArgumentException ex) { expected = ex; } Assert.IsNotNull(expected); }
public void TestFileBackedEmptyName() { ArgumentException expected = null; long maxSize = 0x10000; try { MemoryMappedFile mmf = MemoryMappedFile.CreateWithFileBacking(string.Empty, true, maxSize); } catch (ArgumentException ex) { expected = ex; } Assert.IsNotNull(expected); }