public void testLoadNullImage() { Bitmap nullImg = null; idllmb.setProgram(program); program.initDLLManager(idllmb); idllmb.loadFromDisk(Arg.Any <String>()).Returns <Bitmap>(nullImg); program.load("fakeFilename"); Assert.AreEqual(nullImg, null); }
public void load(string fileName) { if (fileName != "") { try { originalImage = dllManager.loadFromDisk(fileName); resultImage = originalImage; applyResult(originalImage, "apply"); }catch (Exception e) { Console.WriteLine("load error"); } } }