示例#1
0
        public void ShouldSetEtatEnCours()
        {
            var idee = new Idee();

            idee.SetEtatEnCours();

            idee.EtatIdee.Should().Be(EtatsIdees.EnCours);
        }
示例#2
0
        public void ShouldSetEtatEnCoursMarkAsModified()
        {
            var idee = new Idee();

            idee.SetEtatEnCours();

            idee.IsModified().Should().BeTrue();
        }
示例#3
0
        public void ShouldSetSameEtatNotMarkAsModified()
        {
            var idee = new Idee
            {
                EtatIdee = EtatsIdees.EnCours,
            };

            idee.SetEtatEnCours();

            idee.IsModified().Should().BeFalse();
        }
示例#4
0
 public static void SetEtatBasedOnEmotes(this Idee idee, List<IEmote> reactionLists)
 {
     var ideeContext = new BoiteAIdee();
     if (reactionLists.Any(r => r.Name == ideeContext.EmoteEtatTermine.Name))
     {
         idee.SetEtatFaite();
     }
     else if (reactionLists.Any(r => r.Name == ideeContext.EmoteEtatRejete.Name))
     {
         idee.SetEtatRejetee();
     }
     else if (reactionLists.Any(r => r.Name == ideeContext.EmoteEtatEnCours.Name))
     {
         idee.SetEtatEnCours();
     }
 }