Exemplo n.º 1
0
        private ClaimTransformationsLogic ClaimTransformationsLogicInstance()
        {
            var routeBinding            = new RouteBinding();
            var mockHttpContextAccessor = HttpContextAccessorHelper.MockObject(routeBinding);

            var telemetryScopedLogger = TelemetryLoggerHelper.ScopedLoggerObject(mockHttpContextAccessor);

            return(new ClaimTransformationsLogic(telemetryScopedLogger, mockHttpContextAccessor));
        }
Exemplo n.º 2
0
        private AccountLogic AccountLogicInstance(int passwordLength = 8, bool checkPasswordComplexity = true, bool checkPasswordRisk = true)
        {
            var routeBinding = new RouteBinding
            {
                PasswordLength          = passwordLength,
                CheckPasswordComplexity = checkPasswordComplexity,
                CheckPasswordRisk       = checkPasswordRisk,
            };
            var mockHttpContextAccessor = HttpContextAccessorHelper.MockObject(routeBinding);

            var telemetryScopedLogger = TelemetryLoggerHelper.ScopedLoggerObject(mockHttpContextAccessor);

            var fakeTenantRepository = new FakeTenantRepository();
            var fakeMasterRepository = new FakeMasterRepository();

            var secretHashLogic = new SecretHashLogic(mockHttpContextAccessor);

            var accountLogic = new AccountLogic(telemetryScopedLogger, fakeTenantRepository, fakeMasterRepository, secretHashLogic, mockHttpContextAccessor);

            return(accountLogic);
        }