public static void UpdateArchive(this Idee idee) { if (idee.HasToBeArchived()) { idee.Archive(); } }
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(); }
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(); }