1
0
Fork 0
mirror of https://github.com/Sonarr/Sonarr synced 2024-12-27 10:17:47 +00:00
Sonarr/NzbDrone.Common.Test/CacheTests/CachedManagerFixture.cs
2013-05-02 16:06:40 -07:00

33 lines
No EOL
729 B
C#

using System;
using FluentAssertions;
using NUnit.Framework;
using NzbDrone.Common.Cache;
namespace NzbDrone.Common.Test.CacheTests
{
[TestFixture]
public class CachedManagerFixture
{
[Test]
public void should_return_proper_type_of_cache()
{
var result = CacheManger.GetCache<DateTime>(typeof(string));
result.Should().BeOfType<Cached<DateTime>>();
}
[Test]
public void multiple_calls_should_get_the_same_cache()
{
var result1 = CacheManger.GetCache<DateTime>(typeof(string));
var result2 = CacheManger.GetCache<DateTime>(typeof(string));
result1.Should().BeSameAs(result2);
}
}
}