My problem is that we have aTest.cs and a.cs.
a.cs contents a variable which will be used until the all testmethods under aTest.cs are finish, but after the first test method the variable is set to null so the remaining test methods will become failed.
Thank you.
2 Answers, 1 is accepted
0
Stoich
Telerik team
answered on 17 Aug 2011, 10:25 AM
Hi Wilfredo,
I couldn't figure out the exact setup you're using from your description.
Is the variable defined in a.cs static?
Is the variable initially not initialized (i.e. =null) ?
Do you initialize it in the first method of aTest.cs?
My guess is that the issue is related to scope. If the variable is non-static and you're creating an object of type a.cs: there's no way that you can access this object and the value for the variable in a different method. They best thing would be for you to share the code for aTest.cs and a.cs. If you choose to do that please put in some comment next to the lines of code that are related to the variable so that we may readily identify them.