Beispiel #1
0
        public void TestSlotAllocationToUser()
        {
            DefaultRandomGenerator  defaultRandom            = new DefaultRandomGenerator();
            ISlotAssignmentStrategy lockerAssignmentStrategy = new RandomSlotAssignmentStrategy(defaultRandom);
            ILockerRepository       lockerRepository         = new InMemoryLockerRepository();
            ISlotFilteringStrategy  slotFilteringStrategy    = new SizeBasedSlotFilteringStrategy();
            InMemoryOtprepository   slotOtpRepository        = new InMemoryOtprepository();
            RandomOtpGenerator      otpGeneratorRandom       = new RandomOtpGenerator(5, defaultRandom);

            var lockerService = new LockerService(lockerAssignmentStrategy, lockerRepository, slotFilteringStrategy);

            CreateTestLockerWithSlots(new LockerController(lockerService), 2, new Size(10.0, 10.0));
        }
 public LockerController(LockerService lockerService)
 {
     _lockerService = lockerService;
 }