public void ValidNewDeck_IsValid() { var arb = GeneratorsModule.stringOfLength(1, 250).Pipe(_NewDeckGen).Pipe(Arb.From); Prop.ForAll(arb, validNewDeckCommand => new FollowCommandViewModelValidator() .Validate(validNewDeckCommand) .IsValid ).QuickCheckThrowOnFailure(); }
public void InValidNewDeck_IsNotValid() { var arb = Gen.OneOf( GeneratorsModule.stringOfLength(0, 0), GeneratorsModule.stringOfLength(251, 500), Gen.Constant <string>(null) ).Pipe(_NewDeckGen).Pipe(Arb.From); Prop.ForAll(arb, validNewDeckCommand => new FollowCommandViewModelValidator() .Validate(validNewDeckCommand) .IsValid.Pipe(Not) ).QuickCheckThrowOnFailure(); }