I am struggeling with writing unit tests for my class AttachmentProcessor. My goal is to test all methods and mock for example IList FileList.
public class AttachmentsProcessor { public IList<IFileInfo> FileList { get; set; } public AttachmentsProcessor(IList<IFileInfo> FileList) { ... } public void RemoveAttachment(int index) { ... } public long GetTotalFilesSize() { ... } public void GetFilesFromDialog(IOpenFileDialog2 openFileDialog1) { ... } } Interface :
public interface IFileProcessor { IList<IFileInfo> FileList { get; set; } void RemoveAttachment(int index); long GetTotalFilesSize(); void GetFilesFromDialog(IOpenFileDialog2 openFileDialog1); }
AttachmentProcessorover using simpleList<AttahcmentsInfo>?