|
|
|
@ -1,4 +1,5 @@
|
|
|
|
|
using FluentAssertions;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using FluentAssertions;
|
|
|
|
|
using NUnit.Framework;
|
|
|
|
|
using NzbDrone.Core.Indexers;
|
|
|
|
|
using NzbDrone.Core.IndexerSearch;
|
|
|
|
@ -24,8 +25,8 @@ namespace NzbDrone.Core.Test.Messaging.Commands
|
|
|
|
|
[Test]
|
|
|
|
|
public void should_return_true_when_single_property_matches()
|
|
|
|
|
{
|
|
|
|
|
var command1 = new EpisodeSearchCommand { EpisodeId = 1 };
|
|
|
|
|
var command2 = new EpisodeSearchCommand { EpisodeId = 1 };
|
|
|
|
|
var command1 = new EpisodeSearchCommand { EpisodeIds = new List<int>{ 1 } };
|
|
|
|
|
var command2 = new EpisodeSearchCommand { EpisodeIds = new List<int> { 1 } };
|
|
|
|
|
|
|
|
|
|
CommandEqualityComparer.Instance.Equals(command1, command2).Should().BeTrue();
|
|
|
|
|
}
|
|
|
|
@ -42,8 +43,8 @@ namespace NzbDrone.Core.Test.Messaging.Commands
|
|
|
|
|
[Test]
|
|
|
|
|
public void should_return_false_when_single_property_doesnt_match()
|
|
|
|
|
{
|
|
|
|
|
var command1 = new EpisodeSearchCommand { EpisodeId = 1 };
|
|
|
|
|
var command2 = new EpisodeSearchCommand { EpisodeId = 2 };
|
|
|
|
|
var command1 = new EpisodeSearchCommand { EpisodeIds = new List<int> { 1 } };
|
|
|
|
|
var command2 = new EpisodeSearchCommand { EpisodeIds = new List<int> { 2 } };
|
|
|
|
|
|
|
|
|
|
CommandEqualityComparer.Instance.Equals(command1, command2).Should().BeFalse();
|
|
|
|
|
}
|
|
|
|
|