jeudi 28 avril 2016

How to fill an object with data in NUnit

How is it possible to add data to a TestCaseSource object which contains a Dictionary?

I have following code:

static object[] FileInfoCases =
        {
        new object[] { new Dictionary<string, List<BackupFileInfo>>()["source"] = new List<BackupFileInfo>() { .FileName = "", FileLastChanged = new DateTime(), FullPath = "TestPath" } }
        };

BackupFileInfo is my Cutsom object. The values FileName and FileLastChanged and FullPath are Attributes of my custom object. Now I want to fill the List. My custom object is not static. I can not access the attribute names within the list.

Can someone help me please?

Aucun commentaire:

Enregistrer un commentaire