Unit testing with I/O dependencies
问题 I would like to test the following class but I/O and sealed class dependencies are making it quite hard. public class ImageDrawingCombiner { /// <summary> /// Save image to a specified location in path /// </summary> /// <param name="path">Location to save the image</param> /// <param name="surface">The image as canvas</param> public void CombineDrawingsIntoImage(Uri path, Canvas surface) { Size size = new Size(surface.ActualWidth, surface.ActualHeight); // Create a render bitmap and push the