Exemplo n.º 1
0
        public void ReturnTheCorrectTimeslotUnavailableValuesIfIfNAreSupplied()
        {
            var expected = new List <int>();
            var target   = new RoomBuilder();

            var count = 25.GetRandom(10);

            for (int i = 0; i < count; i++)
            {
                int expectedTimeslot = Int32.MaxValue.GetRandom();
                expected.Add(expectedTimeslot);
                target.AddTimeslotUnavailable(expectedTimeslot);
            }

            var actualRoom = target.Build(Int32.MaxValue.GetRandom());

            Assert.True(expected.HasSameValues(actualRoom.UnavailableForTimeslots));
        }
Exemplo n.º 2
0
        public void ReturnATimeslotsUnavailableCollectionWithNValuesIfNAreSupplied()
        {
            var expected = new List <int>();
            var target   = new RoomBuilder();

            var count = 25.GetRandom(10);

            for (int i = 0; i < count; i++)
            {
                int expectedTimeslot = Int32.MaxValue.GetRandom();
                expected.Add(expectedTimeslot);
                target.AddTimeslotUnavailable(expectedTimeslot);
            }

            var actualRoom = target.Build(Int32.MaxValue.GetRandom());

            Assert.Equal(count, actualRoom.UnavailableForTimeslots.Count());
        }