本文整理汇总了C#中LeanKit.API.Client.Library.TransferObjects.Card.ToCardView方法的典型用法代码示例。如果您正苦于以下问题:C# Card.ToCardView方法的具体用法?C# Card.ToCardView怎么用?C# Card.ToCardView使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LeanKit.API.Client.Library.TransferObjects.Card
的用法示例。
在下文中一共展示了Card.ToCardView方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CallWillUpdateCard
public void CallWillUpdateCard()
{
Board board = GetSampleBoard();
_apiMock.Expect(x => x.GetBoard(1)).Return(board);
Card cardToUpdate = new Card
{
Id = 1,
Title = "Card 1 Updated",
LaneId = 1,
Description = "some desc 1",
TypeId = 1,
ExternalCardID = "123"
};
CardUpdateResult result = new CardUpdateResult {BoardVersion = 1, CardDTO = cardToUpdate.ToCardView()};
_apiMock.Expect(x => x.UpdateCard(Arg<long>.Is.Anything, Arg<Card>.Is.Anything)).Return(result);
_integration = new LeanKitIntegration(1, _apiMock);
_integration.ShouldContinue = false;
_integration.StartWatching();
_integration.UpdateCard(cardToUpdate);
Card card = _integration.GetCard(1);
Assert.NotNull(card);
Assert.AreEqual("Card 1 Updated", card.Title);
}