Beispiel #1
0
 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);
     }
 }
Beispiel #2
0
 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);
     }
 }