-
Notifications
You must be signed in to change notification settings - Fork 105
Description
The unit tests are failing again, at least on my machine. From my current location, I am unable to access afn.org, where some of the pages for referrer unit tests are hosted. Perhaps afn.org is down for everyone, world-wide?
In general, the unit tests are a bit of a mess. In addition to afn.org, there is a handful of other external systems over which the SimpleBrowserDotNet organization has no control whatsoever. If those systems go down or change, the unit tests break. That's not good process. The unit tests should only break if a code change in SimpleBrowser breaks them. False negatives are inefficient and erode confidence in the quality of the unit tests.
I see refactoring unit tests as being a long process. As a first step in cleaning up the unit tests, let's remove all external dependencies. The project should be self-contained, without the need for external systems. This will also assist in testing in a CI/CD environment.
Notes:
- Currently, the unit tests are broken up into InternalTests, OnlineTests, and OfflineTests. This structure will no longer make sense if all of the test are now OfflineTests. A new structure will need to be determined and the project updated accordingly.
- NUnit is currently in use. A good companion to it, which will probably be required is NSubstitute. In order to eliminate the external systems, a class or process that mimics a web server may be required. NSubstitute may be able to assist with that.