Exemple #1
0
        public void Validate_ShouldContainNotification_WhenIdIsZero()
        {
            var notifications = new DeleteCircuitCommand(0)
                                .Validate();

            notifications.Should().ContainEquivalentOf(new Notification("circuit.id", "Circuit id must be informed"));
        }
Exemple #2
0
        public void Validate_ShouldNotContainNotification_WhenIdIsValid()
        {
            var notifications = new DeleteCircuitCommand(1)
                                .Validate();

            notifications.Where(n => n.Code == "circuit.id")
            .Should().BeEmpty();
        }