mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2024-12-23 23:56:26 +01:00
43 lines
1.7 KiB
C#
43 lines
1.7 KiB
C#
|
using NUnit.Framework;
|
|||
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
|
|||
|
namespace UITest.Fixtures.ObjectTests.User.Account
|
|||
|
{
|
|||
|
[TestFixture]
|
|||
|
public class TestAccount
|
|||
|
{
|
|||
|
[Test]
|
|||
|
public void TestConstruct()
|
|||
|
{
|
|||
|
var l_oAccount = new TINK.Model.User.Account.Account("a@b", "112", "3330", new List<string> { "Honkey", "Tonkey" }, TINK.Model.User.Account.Permissions.None);
|
|||
|
|
|||
|
Assert.AreEqual("a@b", l_oAccount.Mail);
|
|||
|
Assert.AreEqual("112", l_oAccount.Pwd);
|
|||
|
Assert.AreEqual("3330", l_oAccount.SessionCookie);
|
|||
|
Assert.AreEqual("Honkey,Tonkey", String.Join(",", l_oAccount.Group));
|
|||
|
Assert.AreEqual(TINK.Model.User.Account.Permissions.None, l_oAccount.DebugLevel);
|
|||
|
}
|
|||
|
|
|||
|
[Test]
|
|||
|
public void TestConstruct_Copy()
|
|||
|
{
|
|||
|
var l_oAccount = new TINK.Model.User.Account.Account(new TINK.Model.User.Account.Account("a@b", "112", "3330", new List<string> { "Honkey", "Tonkey" },TINK.Model.User.Account.Permissions.None));
|
|||
|
|
|||
|
Assert.AreEqual("a@b", l_oAccount.Mail);
|
|||
|
Assert.AreEqual("112", l_oAccount.Pwd);
|
|||
|
Assert.AreEqual("3330", l_oAccount.SessionCookie);
|
|||
|
Assert.AreEqual("Honkey,Tonkey", String.Join(",", l_oAccount.Group));
|
|||
|
Assert.AreEqual(TINK.Model.User.Account.Permissions.None, l_oAccount.DebugLevel);
|
|||
|
}
|
|||
|
|
|||
|
[Test]
|
|||
|
public void TestConstruct_InvalidGroup()
|
|||
|
{
|
|||
|
Assert.Throws<ArgumentException>(() => new TINK.Model.User.Account.Account("a@b", "112", "3330", null, TINK.Model.User.Account.Permissions.None));
|
|||
|
Assert.Throws<ArgumentException>(() => new TINK.Model.User.Account.Account(null));
|
|||
|
|
|||
|
}
|
|||
|
}
|
|||
|
}
|