Esempio n. 1
0
        public void should_return_false_when_only_one_has_null_property()
        {
            var command1 = new EpisodeSearchCommand(null);
            var command2 = new EpisodeSearchCommand(new List <int>());

            CommandEqualityComparer.Instance.Equals(command1, command2).Should().BeFalse();
        }
        public void should_return_false_when_single_property_doesnt_match()
        {
            var command1 = new EpisodeSearchCommand {
                EpisodeId = 1
            };
            var command2 = new EpisodeSearchCommand {
                EpisodeId = 2
            };

            CommandEqualityComparer.Instance.Equals(command1, command2).Should().BeFalse();
        }
        public void should_return_true_when_single_property_matches()
        {
            var command1 = new EpisodeSearchCommand {
                EpisodeId = 1
            };
            var command2 = new EpisodeSearchCommand {
                EpisodeId = 1
            };

            CommandEqualityComparer.Instance.Equals(command1, command2).Should().BeTrue();
        }
        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();
        }