public void OneFromSix(string value, int unique) { var vm = new UniqueModel { Unique1 = value }; var validations = vm.Validate(vm.Unique1, _unique1); validations.Print(_output); Assert.Empty(validations); Assert.True(unique > 0); }
public void FourFromSix(string value, int unique) { var vm = new UniqueModel { Unique4 = value }; var validations = vm.Validate(vm.Unique4, _unique4); validations.Print(_output); if (unique >= 4) { Assert.Empty(validations); } else { Assert.Collection(validations, v => v.ErrorMessage = "4 unique characters are required"); } }