I have an interface like this:
Interface IWriteFile { string FileName {get;set;} void Open(); void WriteData(string dataToWrite); void Close(); }
I want to test a class that will use this interface to populate a file. It will call WriteData a bunch of times, and I just want to check the final output. Is there a way to introduce a new private field for the Mock object that will be added each time WriteData (Data) is called?
I just want to see what the file will look like at the end of the day. Is there a better approach to this?
source share