views:

26

answers:

1

I have a constructor that looks like this:

Public Sub New() MyBase.New() ws.Url = My.Settings.WebServiceURL End Sub

(ws is private)

Is there any point in unit testing this?

The class did not previously have this constructor.

A: 

Is this the only constructor for the class? If so, then you test it every time you test the class, and a separate test is unnecessary. If you had written a separate test, you would have refactored it into the others after the first success.

John Saunders
Well, the class did not have any constructors before. Two were added. All they do is to call the base and setting the url.MyBase.New(formatter)ws.Url = My.Settings.WebServiceUrl