Пример #1
0
        public void Scenario_ArchiveAndUnarchive()
        {
            _trelloReadWrite.Lists.Archive(_basicsListWritable);

            var closedList = _trelloReadWrite.Lists.WithId(_basicsListWritable.GetListId());

            Assert.That(closedList.Closed, Is.True);

            _trelloReadWrite.Lists.Unarchive(closedList);

            var reopenedList = _trelloReadWrite.Lists.WithId(_basicsListWritable.GetListId());

            Assert.That(reopenedList.Closed, Is.False);
        }
Пример #2
0
        public NewCard(string name, IListId list)
        {
            Guard.NotNullOrEmpty(name, "name");
            Guard.NotNull(list, "list");

            Name = name;
            IdList = list.GetListId();
        }
Пример #3
0
		public CardsMoveToBoardRequest(ICardId card, IBoardId board, IListId list)
			: base(card, "idBoard", Method.PUT)
		{
			Guard.NotNull(board, "board");
			this.AddValue(board.GetBoardId());

			if (list != null)
				AddParameter("idList", list.GetListId());
		}
Пример #4
0
        public CardsMoveToBoardRequest(ICardId card, IBoardId board, IListId list)
            : base(card, "idBoard", Method.PUT)
        {
            Guard.NotNull(board, "board");
            this.AddValue(board.GetBoardId());

            if (list != null)
            {
                AddParameter("idList", list.GetListId());
            }
        }
Пример #5
0
		public void Scenario_AddAndDelete()
		{
			var card = _trelloReadWrite.Cards.Add(new NewCard("A new card", _basicsListWritable) { Desc = "The card description" });

			Assert.That(card.Desc, Is.EqualTo("The card description"));
			Assert.That(card.Name, Is.EqualTo("A new card"));
			Assert.That(card.IdBoard, Is.EqualTo(_welcomeBoardWritable.GetBoardId()));
			Assert.That(card.IdList, Is.EqualTo(_basicsListWritable.GetListId()));

			_trelloReadWrite.Cards.Delete(card);

			var deletedCard = _trelloReadWrite.Cards.WithId(card.Id);

			Assert.That(deletedCard, Is.Null);
		}
Пример #6
0
 public CardsMoveRequest(ICardId card, IListId list)
     : base(card, "idList", Method.PUT)
 {
     Guard.NotNull(list, "list");
     this.AddValue(list.GetListId());
 }
Пример #7
0
		public ListsRequest(IListId list, string resource = "", Method method = Method.GET)
			: base("list/{listId}/" + resource, method)
		{
			Guard.NotNull(list, "list");
			AddParameter("listId", list.GetListId(), ParameterType.UrlSegment);			
		}
Пример #8
0
 public ListRequest(IListId listId, string resource = "", Method method = Method.GET)
     : base("list/{listId}/" + resource, method)
 {
     AddParameter("listId", listId.GetListId(), ParameterType.UrlSegment);
 }
Пример #9
0
		public CardsMoveRequest(ICardId card, IListId list)
			: base(card, "idList", Method.PUT)
		{
			Guard.NotNull(list, "list");
			this.AddValue(list.GetListId());
		}
Пример #10
0
 public ListsRequest(IListId list, string resource = "", Method method = Method.GET)
     : base("lists/{listId}/" + resource, method)
 {
     Guard.NotNull(list, "list");
     AddParameter("listId", list.GetListId(), ParameterType.UrlSegment);
 }