Hi Everyone.
I'm getting a strange error when I try to run a set of unit tests where the class has a DeploymentItem attribute.
The unit testing solution has 2 test classes, one to test business logic which I'll refer to as 'class a' (this one works fine regardless) and one to test reading of data from the DeploymentItem file which I'll refer to as 'class b'.
With the DeploymentItem attribute set ANYWHERE within the two test classes, the tests in class b all fail with the error...
Unable to create instance of class [class b]. Error: System.NullReferenceException: Object reference not set to an instance of an object..
However, if I completely remove the DeploymentItem attribute from both classes, all tests run, but obviously fail in class b because there is no file to read from, therefore all asserts fail.
I hope I've explained the problem fully, if not I should be able to clarify more if required. Very grateful for any help.