I have a class (call it filetest) in a class library (b), which is trying to get files from a directory which does not exist. This throws an exception fine, and there is a throw in the catch block.
Above in the callstack in a class called Test (excuse the names as this si a test), there I call the class filetest and the method which reads the wrong directory, and try to catch the exception.
I have an NUnit test which calls the class/method responsible for invking filetest and the method which reads the wrong directory. I have an expectedexception attribute, set to DirectoryNotFoundException, but the test fails saying "UnsupportException thrown". Am I wrong to expect an exception in the method in Test?
Thanks