mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
Tests for command comparer when lists are different
This commit is contained in:
@@ -1,9 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Microsoft.AspNet.SignalR.Hosting;
|
|
||||||
using Nancy;
|
using Nancy;
|
||||||
using Nancy.ModelBinding;
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using NzbDrone.Api.Extensions;
|
using NzbDrone.Api.Extensions;
|
||||||
using NzbDrone.Api.REST;
|
using NzbDrone.Api.REST;
|
||||||
|
@@ -76,7 +76,6 @@ namespace NzbDrone.Core.Test.Messaging.Commands
|
|||||||
CommandEqualityComparer.Instance.Equals(command1, command2).Should().BeFalse();
|
CommandEqualityComparer.Instance.Equals(command1, command2).Should().BeFalse();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void should_return_false_when_only_one_has_null_property()
|
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();
|
CommandEqualityComparer.Instance.Equals(command1, command2).Should().BeFalse();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void should_return_false_when_commands_are_diffrent_types()
|
public void should_return_false_when_commands_are_diffrent_types()
|
||||||
{
|
{
|
||||||
CommandEqualityComparer.Instance.Equals(new RssSyncCommand(), new ApplicationUpdateCommand()).Should().BeFalse();
|
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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user