public void WhenAValidCommandIsGivenShouldBeValid() { //Given var command = new CreditTransactionCommand( Guid.NewGuid(), "description", 100M ); //When command.Validate(); //Then Assert.True(command.Valid); }
public void WhenAnInvalidcommandIsGivenShouldNotBeValid() { //Given var command = new CreditTransactionCommand( Guid.Empty, "", 0M ); //When command.Validate(); //Then Assert.True(command.Invalid); Assert.Equal(3, command.Notifications.Count); }