public void when_to_account_is_null__throws_argument_exception() { var parameterName = "to" + nameof(Peent.Domain.Entities.Account); AccountEntity account = null; var customizer = new FixedConstructorParameter <AccountEntity>( account, parameterName); _fixture.Customizations.Insert(1, customizer); Action act = () => Create <Sut>(_fixture); act.Should().Throw <ArgumentException>() .WithMessage($"*{parameterName}*"); }
public void when_all_parameters_are_valid__correctly_set_properties() { var name = F.Create <string>(); var description = F.Create <string>(); var type = F.Create <AccountType>(); var currency = F.Create <Peent.Domain.Entities.Currency>(); var account = new Sut(name, description, type, currency); account.Name.Should().Be(name); account.Description.Should().Be(description); account.Type.Should().Be(type); account.Currency.Should().Be(currency); }