public void Process(string name) { string path = CreateFile(name, 120); using (FilterRequest req = new FilterRequest(path)) { IFilter filter = new AutoStretch(); Assert.IsTrue(filter.Convert(req), "Filter failed to operate"); Assert.IsTrue(System.IO.File.Exists(req.Current.LocalPath), "Error: Did not create " + req.Current.LocalPath); Assert.IsTrue(new FileInfo(req.Current.LocalPath).Length > 0, "Error: " + req.Current.LocalPath + "is Zero length"); //req.Preserve (req.Current); using (ImageFile img = ImageFile.Create(req.Current)) { Pixbuf pixbuf = img.Load(); Assert.IsNotNull(pixbuf); } } }
public void Process (string name) { string path = CreateFile (name, 120); using (FilterRequest req = new FilterRequest (path)) { IFilter filter = new AutoStretch (); Assert.IsTrue (filter.Convert (req), "Filter failed to operate"); Assert.IsTrue (System.IO.File.Exists (req.Current.LocalPath), "Error: Did not create " + req.Current.LocalPath); Assert.IsTrue (new FileInfo (req.Current.LocalPath).Length > 0, "Error: " + req.Current.LocalPath + "is Zero length"); //req.Preserve (req.Current); using (ImageFile img = ImageFile.Create (req.Current)) { Pixbuf pixbuf = img.Load (); Assert.IsNotNull (pixbuf); } } }