コード例 #1
0
        /// <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);
        }
コード例 #2
0
 /// <summary>
 /// creating object
 /// </summary>
 public UserCantrollerAPITest()
 {
     //Arrange
     userRL         = new UserRL();
     userBL         = new UserBL(userRL);
     userController = new UserController(userBL);
 }
コード例 #3
0
 public UserController(
     IUserRL userService,
     IMapper mapper)
 {
     _userService = userService;
     _mapper      = mapper;
 }
コード例 #4
0
ファイル: UserBL.cs プロジェクト: sonalkarle/FundooNotes
        public UserBL(IUserRL userRL, IConfiguration config)
        {
            userDetailValidation = new UserDetailValidation();


            this.userRL = userRL;
        }
コード例 #5
0
        public UnitTest1()
        {
            var context = new Application(User);

            _reposLayeruser       = new UserRL(context);
            _reposLayerParking    = new ParkingRL(context);
            _businessLayeruser    = new UserBL(_reposLayeruser);
            _businessLayerparking = new ParkingBL(_reposLayerParking);
        }
コード例 #6
0
        /// <summary>
        /// Default constructor used to create new objects
        /// </summary>
        public UserTestCases()
        {
            IConfigurationBuilder configurationBuilder = new ConfigurationBuilder();

            configurationBuilder.AddJsonFile("appsettings.json");
            this.configuration = configurationBuilder.Build();
            userRepository     = new UserRL();
            userBuiseness      = new UserBL(userRepository);
            userController     = new UserController(userBuiseness, configuration);
        }
コード例 #7
0
        public UserTestCases()
        {
            IConfigurationBuilder configurationBuilder = new ConfigurationBuilder();

            configurationBuilder.AddJsonFile("appsettings.json");
            this.configuration  = configurationBuilder.Build();
            this.userRL         = new UserRL(this.configuration);
            this.userBL         = new UserBL(this.userRL);
            this.userController = new UserController(this.userBL, configuration);
        }
コード例 #8
0
        public UserUnitTesting()
        {
            IConfigurationBuilder builder = new ConfigurationBuilder();

            builder.AddJsonFile(@"D:\FundooProject\FundooNotes\XUnitTestFundooNotes\appsetting.json");
            configuration = builder.Build();
            var context = new UserContext(DbContext);

            userRL = new UserRL(context);
            userBL = new UserBL(userRL);
        }
コード例 #9
0
        //Constructor
        public ParkingLotTestCase()
        {
            var context = new ParkingLotDbContext(dbContextOptions);

            _IVehicalParkingDetailsRL = new VehicalParkingDetailsRL(context);
            _IVehicalParkingDetailsBL = new VehicalParkingDetailsBL(_IVehicalParkingDetailsRL);

            _IUserRL = new UserRL(context);
            _IUserBL = new UserBL(_IUserRL);

            parkingController = new ParkingController(_IVehicalParkingDetailsBL, distributedCache);
            userController    = new UserController(_IUserBL, configuration);
        }
コード例 #10
0
 /// <summary>
 /// paramerised Constructor
 /// </summary>
 /// <param name="userRL"></param>
 public UserBL(IUserRL userRL)
 {
     this.userRL = userRL;
 }
コード例 #11
0
 //constructore declare
 public UserBL(IUserRL UserDetails)
 {
     this.UserDetails = UserDetails;
 }
コード例 #12
0
ファイル: UserBL.cs プロジェクト: Saksham27/chat-app
 public UserBL(IUserRL userRepo)
 {
     this.userRepository = userRepo;
 }
コード例 #13
0
 public UserBL(IUserRL _userRL)
 {
     userRL = _userRL;
 }
コード例 #14
0
 /// <summary>
 /// declaration of employee business registration method
 /// </summary>
 /// <param name="employeeRepository">passing repository registration interface object</param>
 public UserBL(IUserRL employeeRepository)
 {
     this.employeeRepositoryL = employeeRepository;
 }
コード例 #15
0
 public UserBL(IUserRL _IUserRL)
 {
     this._IUserRL = _IUserRL;
 }
コード例 #16
0
 public UserBL(IUserRL Data)
 {
     this.User = Data;
 }
コード例 #17
0
 /// <summary>
 /// Define User test case constructor
 /// </summary>
 public UserTestCase()
 {
     repository     = new UserRL();
     business       = new UserBL(repository);
     userController = new UserController(business, configuration);
 }
コード例 #18
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UserBusiness" /> class.
 /// </summary>
 /// <param name="userRepository">interface instance</param>
 public UserBusiness(IUserRL userRepository)
 {
     this.userRepository = userRepository;
 }
コード例 #19
0
 public UserTestCases()
 {
     userRL         = new UserRL();
     userBL         = new UserBL(userRL);
     userController = new UserController(userBL, configuration);
 }
コード例 #20
0
 public UserBL(IUserRL rl)
 {
     this.rl = rl;
 }
コード例 #21
0
 //constructor
 public UserBL(IUserRL data)
 {
     this.parkingLot = data;
 }
コード例 #22
0
ファイル: UserBL.cs プロジェクト: shrawanamit/Employee_API
 /// <summary>
 /// Initializes a new instance of the <see cref="EmployeeBusiness"/> class.
 /// </summary>
 /// <param name="employeeRepository"> userRepository.</param>
 public UserBL(IUserRL userRepository)
 {
     this.userRL = userRepository;
 }
コード例 #23
0
 //constructore declare
 public UserBL(IUserRL UserDetail)
 {
     userDetail = UserDetail;
 }
コード例 #24
0
 /// <summary>
 /// Initializes a new instance of the <see cref="userManagementTesting" /> class.
 /// </summary>
 public UserManagementTesting()
 {
     this.userRL         = new UserRepository();
     this.userBL         = new UserBusiness(this.userRL);
     this.userController = new UserController(this.userBL);
 }