protected override void BecauseOnce()
        {
            _card = new Card();

            _card.Column = Stubs.BacklogColumn;

            _card.ColumnChanged(null, Stubs.BacklogColumn);
        }
        protected override void BecauseOnce()
        {
            _card = new Card();

            _card.AddActivity(new CardActivity { StartTime = DateTime.Now, Status = ActivityType.Working });

            _card.StartIdle();
        }
        protected override void SetContext()
        {
            _mocks = new RhinoAutoMocker<CardReadyAction>();
            _action = _mocks.ClassUnderTest;

            _cardService = _mocks.Get<ICardService>();
            _card = _mocks.Get<Kokugen.Core.Domain.Card>();
        }
Example #4
0
        public Card CreateCard(Card card, Project project, User user)
        {
            var newcard = new Card
            {
                Title = card.Title,
                Size = card.Size,
                Priority = card.Priority,
                Deadline = card.Deadline,
                Details = card.Details,
                Project = project,
                Color = "grey",
                Status = CardStatus.New,
                AssignedTo = user

            };

            var lastCard = project.GetCards().OrderByDescending(x => x.CardNumber).Take(1).FirstOrDefault();

            newcard.CardNumber = lastCard == null ? 1 : lastCard.CardNumber + 1;

            return newcard;
        }
 protected override void BecauseOnce()
 {
     _card = new Card();
     _card.StartIdle();
 }
Example #6
0
 public INotification SaveCard(Card card)
 {
     var validationResults = _validator.Validate(card);
     if (validationResults.IsValid())
         _cardRepository.SaveAndFlush(card);
     return validationResults;
 }
        protected override void BecauseOnce()
        {
            _card = new Card();

            _card.AddActivity(new CardActivity { StartTime = DateTime.Now, Status = ActivityType.Column, Leaving = Stubs.BacklogColumn});

            _card.Column = Stubs.WorkColumn;
            _card.ColumnChanged(Stubs.BacklogColumn, Stubs.WorkColumn);
        }
Example #8
0
 public virtual void RemoveCard(Card card)
 {
     if (_cards.Contains(card))
         _cards.Remove(card);
 }
Example #9
0
        public virtual void AddCard(Card card)
        {
            if (_cards.Contains(card)) return;

            card.Project = this;
            _cards.Add(card);
        }