Unit testing of TWAIN code

Discussions about TWAIN scanning in GdPicture.NET using GdPictureImaging.
Post Reply
acl
Posts: 19
Joined: Wed Oct 03, 2012 7:52 am

Unit testing of TWAIN code

Post by acl » Wed Sep 11, 2013 3:47 pm

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!

User avatar
Loïc
Site Admin
Posts: 5597
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Unit testing of TWAIN code

Post by Loïc » Wed Sep 11, 2013 4:18 pm

Hello,

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

Kind regards,

Loïc

acl
Posts: 19
Joined: Wed Oct 03, 2012 7:52 am

Re: Unit testing of TWAIN code

Post by acl » Wed Sep 11, 2013 5:39 pm

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.

Post Reply

Who is online

Users browsing this forum: Baidu [Spider] and 2 guests