Page 1 of 1

Unit testing of TWAIN code

Posted: Wed Sep 11, 2013 3:47 pm
by acl
Hi,

is there a way to do automated unit testing of code involving the TWAIN API of GdPicture, without actually having to scan anything? I guess/hope that the developers of GDPicture use something like this internally.

Thanks!

Re: Unit testing of TWAIN code

Posted: Wed Sep 11, 2013 4:18 pm
by Loïc
Hello,

You can use a virtual data source. Here an example: http://sourceforge.net/projects/twain-samples/

Kind regards,

Loïc

Re: Unit testing of TWAIN code

Posted: Wed Sep 11, 2013 5:39 pm
by acl
Tried that one, but it always returns exactly the same image. I want to be able to control the images that are returned, otherwise it's not useful to me.