Пример #1
0
        /// <summary>
        /// Constructor For Setting Required References.
        /// </summary>
        public Tests()
        {
            var myConfiguration = new Dictionary <string, string>
            {
                { "Jwt:Key", "ThisismySecretKey" },
                { "Jwt:Issuer", "https://localhost:44315/" },
                { "Jwt:Audiance", "https://localhost:44315/" },
                { "Logging:LogLevel:Default", "Warning" },
                { "AllowedHosts", "*" },
                { "ConnectionStrings:ConnectionString", "Server=localhost\\SQLEXPRESS;Database=EmployeeManagement;Trusted_Connection=True;" }
            };

            this.configuration = new ConfigurationBuilder()
                                 .AddInMemoryCollection(myConfiguration)
                                 .Build();
            employeeManagementRL = new EmployeeManagementRL(configuration);
            employeeManagementBL = new EmployeeManagementBL(employeeManagementRL);
            distributedCache     = new RedisCache(new RedisCacheOptions
            {
                Configuration = "localhost:6379"
            });
            controller = new EmployeeController(employeeManagementBL, distributedCache, configuration);
        }
 /// <summary>
 /// Construtor For Setting RL, BL and IDistributedCache References.
 /// </summary>
 public EmployeeManagementTests()
 {
     employeeManagementRL = new EmployeeManagementRL(configuration);
     employeeManagementBL = new EmployeeManagementBL(employeeManagementRL);
     controller           = new EmployeeController(employeeManagementBL, distributedCache, configuration);
 }
 /// <summary>
 /// Parameter Constructor For Setting IUser Reference.
 /// </summary>
 /// <param name="information"></param>
 public EmployeeManagementBL(IEmployeeManagementRL userRL)
 {
     this.employeeManagementRL = userRL;
 }