2013-09-11 09:33:47 +03:00
|
|
|
using System;
|
2013-04-15 04:41:39 +03:00
|
|
|
using FluentAssertions;
|
|
|
|
using NUnit.Framework;
|
|
|
|
using NzbDrone.Core.Configuration;
|
|
|
|
using NzbDrone.Core.Test.Framework;
|
|
|
|
using NzbDrone.Core.Update;
|
|
|
|
|
|
|
|
namespace NzbDrone.Core.Test.UpdateTests
|
|
|
|
{
|
|
|
|
public class UpdatePackageProviderFixture : CoreTest<UpdatePackageProvider>
|
|
|
|
{
|
2013-04-16 03:08:06 +03:00
|
|
|
[Test]
|
2013-09-11 09:33:47 +03:00
|
|
|
public void no_update_when_version_higher()
|
2013-04-16 03:08:06 +03:00
|
|
|
{
|
|
|
|
UseRealHttp();
|
2013-09-11 09:33:47 +03:00
|
|
|
Subject.GetLatestUpdate("master", new Version(10,0)).Should().BeNull();
|
|
|
|
}
|
2013-04-15 04:41:39 +03:00
|
|
|
|
2013-09-11 09:33:47 +03:00
|
|
|
[Test]
|
|
|
|
public void finds_update_when_version_lower()
|
|
|
|
{
|
|
|
|
UseRealHttp();
|
|
|
|
Subject.GetLatestUpdate("master", new Version(1, 0)).Should().NotBeNull();
|
2013-04-16 03:08:06 +03:00
|
|
|
}
|
2013-04-15 04:41:39 +03:00
|
|
|
}
|
|
|
|
}
|