public void OnlyOverHttps_SetsAllowOnlyHttpsToTrue()
        {
            var builder = new CspStylesBuilder();

            builder.OnlyOverHttps();
            CspStyleSrcOptions options = builder.BuildOptions();

            Assert.True(options.AllowOnlyHttps);
        }
        public void FromAnywhere_SetsAllowAnyToTrue()
        {
            var builder = new CspStylesBuilder();

            builder.FromAnywhere();
            CspStyleSrcOptions options = builder.BuildOptions();

            Assert.True(options.AllowAny);
        }
        public void AddNonce_SetsAddNonceToTrue()
        {
            var builder = new CspStylesBuilder();

            builder.AddNonce();
            CspStyleSrcOptions options = builder.BuildOptions();

            Assert.True(options.AddNonce);
        }
        public void AllowUnsafeInline_SetsUnsafeInlineToTrue()
        {
            var builder = new CspStylesBuilder();

            builder.AllowUnsafeInline();
            CspStyleSrcOptions options = builder.BuildOptions();

            Assert.True(options.AllowUnsafeInline);
        }
        public void From_AddsUrlToAllowedSources()
        {
            var builder = new CspStylesBuilder();

            builder.From("www.google.com");
            CspStyleSrcOptions options = builder.BuildOptions();

            Assert.Equal("www.google.com", options.AllowedSources.Single());
        }
        public void FromSelf_SetsAllowSelfToTrue()
        {
            var builder = new CspStylesBuilder();

            builder.FromSelf();
            CspStyleSrcOptions options = builder.BuildOptions();

            Assert.True(options.AllowSelf);
        }