0
votes

I have a dictionary that contains a class File in the value:

public Dictionary<string, File> mydict = new Dictionary<string, File>();

The class object File folder = new File() contains different variables such as First and Last (which are parsed from an xml) :

folder.First = Root.Attribute("First").Value;
folder.Last = Root.Attribute("Last").Value;

I want to know how I can grab variables inside the folder object inside the File class in my unit tests.

How can I use this data in my unit tests to work with

Assert.IsNotNull, Assert.AreEqual 
Can you explain your problem a little more clearly? Are you just looking for mydict.Values.First().First, for example? - StriplingWarrior
@StriplingWarrior no I am looking for how I can get my variables stored inside my object folder to work with the Assert tests? If these were just regular variables, I could easily call them in my Assert tests using e.g. Assert.IsNotNull(<object>.First); but since they are inside the mydictdictionary, I have trouble doing the unit testing - Sean Davis