Пример #1
0
 public static void UpdateArchive(this Idee idee)
 {
     if (idee.HasToBeArchived())
     {
         idee.Archive();
     }
 }
Пример #2
0
        public void ShouldIdeeHasToBeArchived()
        {
            var ideeRejetee = new Idee()
            {
                EtatIdee = EtatsIdees.Rejetee,
            };

            var ideeFaite = new Idee()
            {
                EtatIdee = EtatsIdees.Faite,
            };

            ideeRejetee.HasToBeArchived().Should().BeTrue();
            ideeFaite.HasToBeArchived().Should().BeTrue();
        }
Пример #3
0
        public void ShouldIdeeNotHasToBeArchived()
        {
            var ideeEnCours = new Idee()
            {
                EtatIdee = EtatsIdees.EnCours,
            };

            var ideeSoumis = new Idee()
            {
                EtatIdee = EtatsIdees.Soumise,
            };

            ideeEnCours.HasToBeArchived().Should().BeFalse();
            ideeSoumis.HasToBeArchived().Should().BeFalse();
        }