I am creating an application which will be testable(unit + integration). In this application I have a FileHelper static class,
public static class FileHelper
{
public static void ExtractZipFile(Stream zipStream, string location)
{
..................................
}
public static void CreatePageFolderIfNotExist(string directory)
{
.................................................
}
.......................................................
.......................................................
}
But due to static I think it is not testable. How to make this class testable?
public static double sqrt(double x)
, then I just cannot test it? I cannot pass a few parameters in and make sure that I get the expected result or exception? If I have a more complicated function/method that affects the file system or creates some other side effect, is it suddenly that much different? – Leonid Feb 7 '13 at 19:53