/// <summary> /// Constructor For Setting RL, BL, Controller Instances. /// </summary> public Tests() { this.dbContext = new ParkingLotDBContext(dbContextOptions); var myConfiguration = new Dictionary <string, string> { { "Jwt:Key", "ThisismySecretKey" }, { "Jwt:Issuer", "ParkingLot.com" }, { "Jwt:Audiance", "ParkingLot.com" }, { "Logging:LogLevel:Default", "Warning" }, { "AllowedHosts", "*" }, { "ConnectionStrings:ParkingLotConnectionString", "Server=localhost\\SQLEXPRESS;Database=ParkingLotDB;Trusted_Connection=True;" } }; this.configuration = new ConfigurationBuilder().AddInMemoryCollection(myConfiguration).Build(); distributedCache = new RedisCache(new RedisCacheOptions { Configuration = "parkinglot.redis.cache.windows.net:6380,password=RxLRe+cHYDzGro4UX8D4VtkfsifZ93ZM8CJlKI5Tobw=,ssl=True,abortConnect=False", InstanceName = "master" }); userRL = new UserRL(dbContext); userBL = new UserBL(userRL); userController = new UserController(userBL, configuration); parkingLotRL = new ParkingLotRL(dbContext); parkingLotBL = new ParkingLotBL(parkingLotRL); parkingController = new ParkingController(parkingLotBL, distributedCache); }
/// <summary> /// Constructor For Setting ParkingLotRL Instance. /// </summary> /// <param name="parkingLotRL"></param> public ParkingLotBL(IParkingLotRL parkingLotRL) { this.parkingLotRL = parkingLotRL; }