mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2024-12-25 08:36:27 +01:00
31 lines
1.1 KiB
C#
31 lines
1.1 KiB
C#
|
using NUnit.Framework;
|
|||
|
using TINK.Model.User.Account;
|
|||
|
|
|||
|
|
|||
|
namespace TestTINKLib
|
|||
|
{
|
|||
|
|
|||
|
[TestFixture]
|
|||
|
public class TestValidator
|
|||
|
{
|
|||
|
[Test]
|
|||
|
public void TestValidateMailAndPasswordDelegate()
|
|||
|
{
|
|||
|
Assert.AreEqual(Elements.None, Validator.ValidateMailAndPasswordDelegate(null, null).ValidElement);
|
|||
|
|
|||
|
Assert.AreEqual(Elements.None, Validator.ValidateMailAndPasswordDelegate("", null).ValidElement);
|
|||
|
|
|||
|
Assert.AreEqual(Elements.None, Validator.ValidateMailAndPasswordDelegate("a", null).ValidElement);
|
|||
|
|
|||
|
Assert.AreEqual(Elements.None, Validator.ValidateMailAndPasswordDelegate("a@", null).ValidElement);
|
|||
|
|
|||
|
|
|||
|
Assert.AreEqual(Elements.Mail, Validator.ValidateMailAndPasswordDelegate("a@c", "").ValidElement);
|
|||
|
|
|||
|
Assert.AreEqual(Elements.Mail, Validator.ValidateMailAndPasswordDelegate("a@c", "123").ValidElement);
|
|||
|
|
|||
|
Assert.AreEqual(Elements.Mail | Elements.Password, Validator.ValidateMailAndPasswordDelegate("a@c", "123456789" /* password */).ValidElement);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|