Sonarr/src/NzbDrone.Common.Test/EnsureTest/PathExtensionFixture.cs

27 lines
687 B
C#
Raw Normal View History

using NUnit.Framework;
using NzbDrone.Common.EnsureThat;
using NzbDrone.Test.Common;
namespace NzbDrone.Common.Test.EnsureTest
{
[TestFixture]
public class PathExtensionFixture : TestBase
{
[TestCase(@"p:\TV Shows\file with, comma.mkv")]
2013-07-26 05:00:57 +00:00
[TestCase(@"\\serer\share\file with, comma.mkv")]
public void EnsureWindowsPath(string path)
{
2013-07-26 05:00:57 +00:00
WindowsOnly();
2013-11-30 23:53:07 +00:00
Ensure.That(path, () => path).IsValidPath();
2013-07-26 05:00:57 +00:00
}
2013-07-26 05:29:59 +00:00
[TestCase(@"/var/user/file with, comma.mkv")]
2013-07-26 05:00:57 +00:00
public void EnsureLinuxPath(string path)
{
PosixOnly();
2013-11-30 23:53:07 +00:00
Ensure.That(path, () => path).IsValidPath();
}
}
}