public void X() { var sut = new InterfacePasswordValidator( this.mockLengthValidator.Object, this.mockDigitsValidator.Object, this.implementation, this.mockSpecialCharacterValidator.Object, this.mockConsecutiveCharacterValidator.Object); Assert.IsFalse(sut.IsPasswordValid("xx")); }
public void X2() { var sut = new InterfacePasswordValidator( this.mockLengthValidator.Object, this.mockDigitsValidator.Object, this.mockUppercaseValidator.Object, this.implementation, this.mockConsecutiveCharacterValidator.Object); Assert.Catch(() => sut.IsPasswordValid("xx")); Assert.Throws <ApplicationException>(() => sut.IsPasswordValid("xx")); }