1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-22 22:15:17 -04:00

Updated tests to work better with VS2013 Test Adapter.

This commit is contained in:
Taloth Saldono
2014-05-04 16:33:25 +02:00
parent 388943ea1b
commit 79b2b14668
11 changed files with 121 additions and 112 deletions
@@ -1,5 +1,6 @@
using System;
using System.IO;
using System.Linq;
using FluentAssertions;
using NUnit.Framework;
using NzbDrone.Common.Disk;
@@ -61,7 +62,17 @@ namespace NzbDrone.Common.Test.DiskProviderTests
{
WindowsOnly();
Assert.Throws<DirectoryNotFoundException>(() => Subject.GetAvailableSpace(@"Z:\NOT_A_REAL_PATH\DOES_NOT_EXIST".AsOsAgnostic()));
// Find a drive that doesn't exist.
for (char driveletter = 'Z'; driveletter > 'D' ; driveletter--)
{
if (new DriveInfo(driveletter.ToString()).IsReady)
continue;
Assert.Throws<DirectoryNotFoundException>(() => Subject.GetAvailableSpace(driveletter + @":\NOT_A_REAL_PATH\DOES_NOT_EXIST".AsOsAgnostic()));
return;
}
Assert.Inconclusive("No drive available for testing.");
}
[Test]