mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 05:53:33 -07:00
More NzbDrone.Common updates
This commit is contained in:
parent
6828f099bc
commit
c42518b34e
6 changed files with 46 additions and 2 deletions
|
@ -63,6 +63,7 @@
|
|||
<Compile Include="ProcessProviderTests.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="ServiceControllerTests.cs" />
|
||||
<Compile Include="WebClientTests.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
|
|
28
NzbDrone.Common.Test/WebClientTests.cs
Normal file
28
NzbDrone.Common.Test/WebClientTests.cs
Normal file
|
@ -0,0 +1,28 @@
|
|||
// ReSharper disable InconsistentNaming
|
||||
using FluentAssertions;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace NzbDrone.Common.Test
|
||||
{
|
||||
[TestFixture]
|
||||
public class WebClientTests
|
||||
{
|
||||
[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);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue