public void TestInitialize()
        {
            var configurationBuilder = new ConfigurationBuilder()
                                       .AddJsonFile("appsettings.json")
                                       .AddEnvironmentVariables();

            _configuration = configurationBuilder.Build();

            _builder = new ContainerBuilder();
            _builder.RegisterModule <IoModule>();
            _builder.RegisterModule <SecurityModule>();
            _builder.RegisterAllConfigurationsInAssembly(_configuration, typeof(NWebSecConfig).Assembly);

            var container = _builder.Build();

            _testee = container.Resolve <IHeaderConfigurationParser>();
        }
        private static Action <ICspDirectiveConfiguration> GetCspConfigurationFor(string source, IHeaderConfigurationParser parser)
        {
            var input = parser.Parse(source).ToList();

            if (input.Any())
            {
                return(s => s.Self().CustomSources(input.ToArray()).UnsafeInline());
            }

            return(s => s.Self().UnsafeInline());
        }