public void NeedsNumber_RoundtripValue() { var section = new PasswordValidationSection(); section.NeedsNumber = true; Assert.AreEqual(true, section.NeedsNumber); section.NeedsNumber = false; Assert.AreEqual(false, section.NeedsNumber); }
public void MinimumPasswordLength_RoundtripValue() { var section = new PasswordValidationSection(); section.MinimumPasswordLength = 10; Assert.AreEqual(10, section.MinimumPasswordLength); }
public void NeedsSymbol_RoundTrip() { var section = new PasswordValidationSection(); Assert.IsFalse(section.NeedsSymbol); section.NeedsSymbol = true; Assert.IsTrue(section.NeedsSymbol); }
public void WordListProcessOptions_RoundtripValue() { var value = new WordListProcessOptionsElement(); var section = new PasswordValidationSection(); section.WordListProcessOptions = value; // Through the regular getter Assert.AreSame(value, section.WordListProcessOptions); // Through the expicit interface getter var options = ((IPasswordValidationSettings) section).WordListProcessOptions; Assert.AreSame(value, options); }
public void InterfaceCustomLists_RoundtripValue() { var section = new PasswordValidationSection(); IPasswordValidationSettings iSection = section; var collection = new CustomWordListCollection(); Assert.AreNotSame(collection, iSection.CustomWordLists); section.CustomWordLists = collection; Assert.AreSame(collection, iSection.CustomWordLists); }
public void CustomWordLists_RoundTripValue() { var section = new PasswordValidationSection(); var collection = new CustomWordListCollection(); Assert.AreNotSame(collection, section.CustomWordLists); section.CustomWordLists = collection; Assert.AreSame(collection, section.CustomWordLists); }