1
0
Fork 0
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:
Mark McDowall 2013-10-05 16:22:25 -07:00
parent fa74551777
commit 6cff6122a1
2 changed files with 17 additions and 5 deletions

View file

@ -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;

View file

@ -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();
}
}
}