public void ReadPgmTestFileNotFound() { CPU target = new CPU(); string fullFilename = "FileNotExist.cpu"; string[] actual; try { actual = target.ReadPgm(fullFilename); Assert.Fail("fileNotFoundException exptected"); } catch (FileNotFoundException) { Assert.IsTrue(true); } }
public void ReadPgmTestFileExtNotSupported() { CPU target = new CPU(); string fullFilename = "FileNotExist.txt"; string[] actual; try { actual = target.ReadPgm(fullFilename); Assert.Fail("FileExtention not supported"); } catch (CPUException) { Assert.IsTrue(true); } }