This project is read-only.

Why it's worth to review Unit Tests

Most important usage scenarios for the library are covered in provided Unit Tests project. Unit tests can be considered as a secondary API documentation for the Weather.com.Client, and can be useful in scenarios which are not covered in How to's.

How to run Unit Tests

Before running Unit Tests that require NUnit framework runner, Weather.com.Client.Test.TestBase class file will have to be modified to set missing Partner Id and License Key. So that unit test could be executed against Weather.com service.

 [SetUp]
 public virtual void Initialize()
 {
     _client = new WeatherClient("[Partner Id here]", "[License Key here]");
 }

Can I mock WeatherClient class?

WeatherClient class implements Weather.com.Client.IWeatherClient interface.

How to check if Weather.com.Client library is still compatible with Weather.com web service

There are three unit test suites that retrieve XML from Weather.com service and validate it against XSD schema to check if current Weather.com.Client implementation still match Weather.com service output.
  • Weather.com.Client.Test.SupportedServiceSchema.CurrentConditions.CurrentConditionsTest
  • Weather.com.Client.Test.SupportedServiceSchema.LocationSearch.LocationSearchTest
  • Weather.com.Client.Test.SupportedServiceSchema.WeatherForecast.WeatherForecastTest

Last edited May 2, 2011 at 8:40 AM by mulawam, version 5

Comments

No comments yet.