Exemplo n.º 1
0
        public void Test_Users_Are_Available_Returns_True()
        {
            user  = new User("usuario");
            user2 = new User("usuario2");
            users = new UsersList();
            users.AddUser(user);
            users.AddUser(user2);

            start        = new string[] { "10", "10" };
            end          = new string[] { "11", "11" };
            participants = new UsersList();
            events       = new AppointmentsList();
            Appointment appointment1 = new Appointment("evento", "descripcion", DateTime.Today, start, end, user, participants);
            Appointment appointment2 = new Appointment("evento2", "descripcion2", DateTime.Today, start, end, user, participants);

            events.AddAppointment(appointment1);
            events.AddAppointment(appointment2);

            Assert.IsFalse(users.AreAvailable(DateTime.Today, start, end, events));
        }