forked from dillenmeister/Trello.NET
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTokenTests.cs
43 lines (40 loc) · 982 Bytes
/
TokenTests.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
using System;
using System.Collections.Generic;
using ExpectedObjects;
using NUnit.Framework;
namespace TrelloNet.Tests
{
[TestFixture]
public class TokenTests : TrelloTestBase
{
[Test]
public void WithToken_AToken_ReturnsExpectedToken()
{
var expected = new Token
{
Id = "4f588114f57acfa95fa5065b",
IdMember = Constants.MeId,
DateCreated = new DateTime(2012, 03, 08, 09, 51, 16, 806),
Permissions = new List<Token.TokenPermissions>
{
new Token.TokenPermissions
{
IdModel = "*",
ModelType = "Board",
Read = true,
Write = false
},
new Token.TokenPermissions
{
IdModel = "*",
ModelType = "Organization",
Read = true,
Write = false
}
}
}.ToExpectedObject();
var actual = _trelloReadOnly.Tokens.WithToken("a0f05ce01f11b4dceb1127e244bdc9c45705d44f3ec1b349f3f4a4c306e20fcf");
expected.ShouldEqual(actual);
}
}
}