Question: I have this simple jQuery code for drawing a triangle in a 40 by 40 canvas element:

```
var context1 = $("#arrow_left").get(0).getContext('2d');
context1.beginPath();
context1.moveTo(25,0);
context1.lineTo(0,20);
context1.lineTo(25,40);
context1.lineTo(25,0);
context1.fill();
context1.closePath();

```

Now how do I do the same thing in GWT? There is a tutorial at <http://code.google.com/p/google-web-toolkit-incubator/wiki/GWTCanvas>, but the page itself says that that is deprecated and suggests using <http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/canvas/client/Canvas.html>. However the latter has no documentation on drawing. Can anyone tell me how to do it in GWT?

Answer: 
I think it would be difficult for you to test the DLL directly without any dependencies. As an alternative I would suggest that you instead run isolated tests on the code using U[nit Testing](http://en.wikipedia.org/wiki/Unit_testing).

I would recommend that you take a look at this introduction to Unit Testing with Visual Studio. <http://www.codeproject.com/Articles/391465/Creating-Unit-tests-for-your-csharp-code>
You should develop a [Unit test](http://en.wikipedia.org/wiki/Unit_testing) project.
However, you will have to [mock / stub](https://stackoverflow.com/q/463707/296526) out dependencies used by your class library.
To do this efficiently you need to 'design' your class library to be easy to test. 

For good advice, I can recommend the book '[The art of Unit Testing](http://artofunittesting.com/)' by Roy Osherove.

You can try MStest (With some versions included with VS) or [Nunit](http://www.nunit.org/).

However if you are working with legacy or hard to test code, special frameworks can help you out to inject dependencies like external DLLs. One example is [Typemock](http://www.typemock.com/)