static void Main(string[] args)
        {
            Console.WriteLine("Generating the commands");

            var rooms      = new RoomReferential();
            var commands   = new List <ICommand>();
            var rounds     = 1;
            var roomsCount = 1;

            //var roomsCount = rooms.Count();
            for (int round = 1; round <= rounds; round++)
            {
                commands.AddRange(
                    Enumerable.Range(1, roomsCount)
                    .Select(roomNumber => new CleaningRequestCommand()
                {
                    RequestedAt = DateTime.UtcNow, RoomId = rooms.GetByNumber(roomNumber).Id
                })
                    );
            }


            Console.WriteLine("Dispatching the commands");
            foreach (var command in commands)
            {
                CompositionRoot.DispatchCommand(command);
            }


            Console.ReadLine();
        }
Exemple #2
0
 public UnitTest1()
 {
     rooms = new HotelMgmt.Domain.Rooms.RoomReferential();
 }