public void NonDigitTest() { Assert.False(PinLength.Validate("a234"), "Wrong output for \"a234\""); Assert.False(PinLength.Validate(".234"), "Wrong output for \".234\""); Assert.False(PinLength.Validate("123\\n"), "Wrong output for \"123\\n\""); Assert.False(PinLength.Validate("1234\\n"), "Wrong output for \"1234\\n\""); }
public void ValidTest() { Assert.True(PinLength.Validate("1234"), "Wrong output for \"1234\""); Assert.True(PinLength.Validate("0000"), "Wrong output for \"0000\""); Assert.True(PinLength.Validate("1111"), "Wrong output for \"1111\""); Assert.True(PinLength.Validate("123456"), "Wrong output for \"123456\""); Assert.True(PinLength.Validate("098765"), "Wrong output for \"098765\""); Assert.True(PinLength.Validate("000000"), "Wrong output for \"000000\""); Assert.True(PinLength.Validate("090909"), "Wrong output for \"090909\""); }
public void LengthTest() { Assert.False(PinLength.Validate("1"), "Wrong output for \"1\""); Assert.False(PinLength.Validate("12"), "Wrong output for \"12\""); Assert.False(PinLength.Validate("123"), "Wrong output for \"123\""); Assert.False(PinLength.Validate("12345"), "Wrong output for \"12345\""); Assert.False(PinLength.Validate("1234567"), "Wrong output for \"1234567\""); Assert.False(PinLength.Validate("-1234"), "Wrong output for \"-1234\""); Assert.False(PinLength.Validate("1.234"), "Wrong output for \"1.234\""); Assert.False(PinLength.Validate("-1.234"), "Wrong output for \"-1.234\""); Assert.False(PinLength.Validate("00000000"), "Wrong output for \"00000000\""); }