public async Task Issue59_EditComments() { ICard card = null; var name = "edit comment test"; try { TrelloAuthorization.Default.AppKey = TrelloIds.AppKey; var list = _factory.List(TrelloIds.ListId); card = await list.Cards.Add(name); var comment = await card.Comments.Add("This is a comment"); comment.Data.Text = "This comment was changed."; Thread.Sleep(5); await TrelloProcessor.Flush(); } finally { card?.Delete(); } }
public async Task Issue35_DatesReturningAs1DayBefore() { ICard card = null; try { TrelloAuthorization.Default.AppKey = TrelloIds.AppKey; var learningBoard = _factory.Board(TrelloIds.BoardId); await learningBoard.Lists.Refresh(); var list = learningBoard.Lists.First(); var member = list.Board.Members.First(); card = await list.Cards.Add("test card 2"); card.DueDate = new DateTime(2016, 07, 21); await TrelloProcessor.Flush(); var cardCopy = _factory.Card(card.Id); Assert.AreEqual(new DateTime(2016, 07, 21), cardCopy.DueDate); } finally { card?.Delete(); } }
public async Task Issue46_DueComplete() { ICard card = null; var name = "due complete test"; var description = "this is a description"; var position = Position.Top; var dueDate = new DateTime(2014, 1, 1); try { TrelloAuthorization.Default.AppKey = TrelloIds.AppKey; var list = _factory.List(TrelloIds.ListId); card = await list.Cards.Add(name, description, position, dueDate); Assert.AreEqual(false, card.IsComplete); card.IsComplete = true; await TrelloProcessor.Flush(); var recard = _factory.Card(card.Id); await recard.Refresh(); Assert.AreEqual(true, recard.IsComplete); await TrelloProcessor.Flush(); } finally { card?.Delete(); } }
public async Task Issue36_CardAttachmentByUrlThrows() { ICard card = null; try { TrelloAuthorization.Default.AppKey = TrelloIds.AppKey; var list = _factory.List(TrelloIds.ListId); card = await list.Cards.Add("attachment test"); await card.Attachments.Add("http://i.imgur.com/eKgKEOn.jpg", "me"); } finally { card?.Delete(); } }
public async Task Issue47_AddCardWithDetails() { ICard card = null; var name = "card detailed creation test"; var description = "this is a description"; var position = Position.Top; var dueDate = new DateTime(2014, 1, 1); try { TrelloAuthorization.Default.AppKey = TrelloIds.AppKey; var me = await _factory.Me(); var members = new IMember[] { me }; var board = _factory.Board(TrelloIds.BoardId); await board.Refresh(); var labels = new[] { board.Labels.FirstOrDefault(l => l.Color == LabelColor.Blue) }; var list = _factory.List(TrelloIds.ListId); card = await list.Cards.Add(name, description, position, dueDate, true, members, labels); var recard = _factory.Card(card.Id); await recard.Refresh(); Assert.AreEqual(name, recard.Name); Assert.AreEqual(description, recard.Description); Assert.AreEqual(card.Id, list.Cards.First().Id); Assert.AreEqual(dueDate, recard.DueDate); Assert.IsTrue(recard.IsComplete.Value, "card not complete"); Assert.IsTrue(recard.Members.Contains(me), "member not found"); Assert.IsTrue(recard.Labels.Contains(labels[0]), "label not found"); await TrelloProcessor.Flush(); } finally { card?.Delete(); } }
public async Task Issue45_DueDateAsMinValue() { ICard card = null; try { TrelloAuthorization.Default.AppKey = TrelloIds.AppKey; var list = _factory.List(TrelloIds.ListId); card = await list.Cards.Add("min date test"); card.Description = "a description"; card.DueDate = DateTime.MinValue; await TrelloProcessor.Flush(); } finally { card?.Delete(); } }
public async Task Issue37_InconsistentDateEncoding() { ICard card = null; try { TrelloAuthorization.Default.AppKey = TrelloIds.AppKey; var list = _factory.List(TrelloIds.ListId); card = await list.Cards.Add("date encoding test"); // 2016-12-08T04:45:00.000Z var date = Convert.ToDateTime("8/12/2016 5:45:00PM"); card.DueDate = date; await TrelloProcessor.Flush(); } finally { card?.Delete(); } }
public async Task <IActionResult> Delete([FromQuery] int id) { await _card.Delete(id); return(Ok("Карта пациента успешно удалена")); }
public ActionResult DeleteCard(int id) { _cardRepository.Delete(id); return(RedirectToAction("GetAllCards")); }
public bool Delete(long CardNo) { return(dal.Delete(CardNo)); }