本文整理汇总了C#中Token.ShouldEqual方法的典型用法代码示例。如果您正苦于以下问题:C# Token.ShouldEqual方法的具体用法?C# Token.ShouldEqual怎么用?C# Token.ShouldEqual使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Token
的用法示例。
在下文中一共展示了Token.ShouldEqual方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: WithToken_AToken_ReturnsExpectedToken
public void WithToken_AToken_ReturnsExpectedToken()
{
var expected = new Token
{
Id = "4f2b900cfa08ac1f1b4ae00d",
IdMember = Constants.MeId,
DateCreated = new DateTime(2012, 02, 03, 08, 43, 08, 478),
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("34d12362615097b30d6140a8c596d8e8fd70d198fb6b3df7f6ab5605e4ec6f54");
expected.ShouldEqual(actual);
}
示例2: WithToken_AToken_ReturnsExpectedToken
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);
}
示例3: should_get_existing_token
public void should_get_existing_token()
{
var sessionState = Substitute.For<ISession>();
var tokenStore = new TokenStore<Token>(sessionState);
var token = new Token();
sessionState[TokenStore<Token>.SessionKey].Returns(token);
var result = tokenStore.Get();
token.ShouldEqual(result);
}