1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-10-30 23:42:33 +01:00
Sonarr/NzbDrone.Common.Test/WebClientTests.cs

30 lines
828 B
C#
Raw Normal View History

2011-10-24 00:44:37 +02:00
// ReSharper disable InconsistentNaming
using FluentAssertions;
using NUnit.Framework;
2011-11-13 19:16:31 +01:00
using NzbDrone.Test.Common;
2011-10-24 00:44:37 +02:00
namespace NzbDrone.Common.Test
{
[TestFixture]
2011-11-13 19:16:31 +01:00
public class WebClientTests : TestBase
2011-10-24 00:44:37 +02:00
{
[Test]
public void DownloadString_should_be_able_to_download_jquery()
{
var jquery = new WebClientProvider().DownloadString("http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js");
jquery.Should().NotBeBlank();
jquery.Should().Contain("function(a,b)");
}
[TestCase("")]
[TestCase("http://")]
[TestCase(null)]
[ExpectedException]
public void DownloadString_should_throw_on_error(string url)
{
var jquery = new WebClientProvider().DownloadString(url);
}
}
}