mirror of
https://github.com/Sonarr/Sonarr
synced 2024-12-27 02:07:41 +00:00
Tests for command comparer when lists are different
This commit is contained in:
parent
fa74551777
commit
6cff6122a1
2 changed files with 17 additions and 5 deletions
|
@ -1,9 +1,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Microsoft.AspNet.SignalR.Hosting;
|
||||
using Nancy;
|
||||
using Nancy.ModelBinding;
|
||||
using Newtonsoft.Json;
|
||||
using NzbDrone.Api.Extensions;
|
||||
using NzbDrone.Api.REST;
|
||||
|
|
|
@ -76,7 +76,6 @@ namespace NzbDrone.Core.Test.Messaging.Commands
|
|||
CommandEqualityComparer.Instance.Equals(command1, command2).Should().BeFalse();
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
public void should_return_false_when_only_one_has_null_property()
|
||||
{
|
||||
|
@ -86,13 +85,28 @@ namespace NzbDrone.Core.Test.Messaging.Commands
|
|||
CommandEqualityComparer.Instance.Equals(command1, command2).Should().BeFalse();
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
public void should_return_false_when_commands_are_diffrent_types()
|
||||
{
|
||||
CommandEqualityComparer.Instance.Equals(new RssSyncCommand(), new ApplicationUpdateCommand()).Should().BeFalse();
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
public void should_return_false_when_commands_list_are_different_lengths()
|
||||
{
|
||||
var command1 = new EpisodeSearchCommand { EpisodeIds = new List<int> { 1 } };
|
||||
var command2 = new EpisodeSearchCommand { EpisodeIds = new List<int> { 1, 2 } };
|
||||
|
||||
CommandEqualityComparer.Instance.Equals(command1, command2).Should().BeFalse();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_return_false_when_commands_list_dont_match()
|
||||
{
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue