Example #1
0
        public void AssertThatSalleIsAvailableWhenNoCreneau()
        {
            Salle    salle   = new Salle("A07", 0);
            DateTime date    = DateTime.Now;
            Creneau  creneau = new Creneau(date, 10);

            Assert.True(salle.EstDisponible(creneau));
        }
Example #2
0
        public void AssertThatSalleHasCrenauxAfterAddedOne()
        {
            Salle    salle   = new Salle("A07", 0);
            DateTime date    = DateTime.Now;
            Creneau  creneau = new Creneau(date, 10);

            Assert.True(salle.EstDisponible(creneau));
            bool ajoutCreneau = salle.AjouterIndisponibilite(creneau);

            Assert.True(ajoutCreneau);
        }
Example #3
0
        public void AssertThatSalleIsNotAvailableIfTwiceSameCreneau()
        {
            Salle salle = new Salle("A07", 0);

            DateTime date    = DateTime.Now;
            Creneau  creneau = new Creneau(date, 10);

            salle.AjouterIndisponibilite(creneau);
            bool ajoutCreneau = salle.AjouterIndisponibilite(creneau);

            salle.AjouterIndisponibilite(creneau);

            Assert.False(salle.EstDisponible(creneau));
        }