public void FileNameNullorEmpty_ThrowsException() { Service.FileProcess fp = new TryItOut.Service.FileProcess(); // Throws exception as Empty filename fp.FileExists(""); }
public void FileNameNullorEmpty_ThrowsException_TryCatch() { Service.FileProcess fp = new TryItOut.Service.FileProcess(); try { // Throws exception as Empty filename fp.FileExists(""); } catch (ArgumentNullException) { // Success as trapped exception return; } Assert.Fail("Arguement Exception not thrown."); }