Tests for command comparer when lists are different

pull/2/head
Mark McDowall 11 years ago
parent fa74551777
commit 6cff6122a1

@ -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…
Cancel
Save