mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 14:03:29 -07:00
static resource URLs are now case sensitive.
This commit is contained in:
parent
e89a35522e
commit
478caf15f8
16 changed files with 127 additions and 84 deletions
|
@ -78,12 +78,12 @@ namespace NzbDrone.Common.Test.CacheTests
|
|||
{
|
||||
hitCount++;
|
||||
return null;
|
||||
}, TimeSpan.FromMilliseconds(200));
|
||||
}, TimeSpan.FromMilliseconds(300));
|
||||
|
||||
Thread.Sleep(10);
|
||||
}
|
||||
|
||||
hitCount.Should().BeInRange(4, 6);
|
||||
hitCount.Should().BeInRange(3, 6);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using FluentAssertions;
|
||||
using Moq;
|
||||
using NUnit.Framework;
|
||||
|
@ -69,6 +71,40 @@ namespace NzbDrone.Common.Test
|
|||
ExceptionVerification.ExpectedWarns(1);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void get_actual_casing_for_none_existing_file_should_throw()
|
||||
{
|
||||
WindowsOnly();
|
||||
Assert.Throws<DirectoryNotFoundException>(() => "C:\\InValidFolder\\invalidfile.exe".GetActualCasing());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void get_actual_casing_should_return_actual_casing_for_local_file()
|
||||
{
|
||||
var path = Process.GetCurrentProcess().MainModule.FileName;
|
||||
path.ToUpper().GetActualCasing().Should().Be(path);
|
||||
path.ToLower().GetActualCasing().Should().Be(path);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void get_actual_casing_should_return_actual_casing_for_local_dir()
|
||||
{
|
||||
var path = Directory.GetCurrentDirectory();
|
||||
path.ToUpper().GetActualCasing().Should().Be(path);
|
||||
path.ToLower().GetActualCasing().Should().Be(path);
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
[Explicit]
|
||||
public void get_actual_casing_should_return_original_casing_for_shares()
|
||||
{
|
||||
var path = @"\\server\Pool\Apps";
|
||||
path.GetActualCasing().Should().Be(path);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
[Test]
|
||||
public void AppDataDirectory_path_test()
|
||||
|
@ -76,7 +112,6 @@ namespace NzbDrone.Common.Test
|
|||
GetIAppDirectoryInfo().GetAppDataPath().Should().BeEquivalentTo(@"C:\NzbDrone\");
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
public void Config_path_test()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue