Inheritance: ISslDomainCheck
Example #1
0
        public void CheckIfSslIsEnforcedTest(string domain, bool shouldBeEnforced)
        {
            var logger = new FakeLogger();
            var serializer = new FakeDomainSerializer();

            var check = new SslDomainCheck(logger, serializer);
            bool result = check.EnforceSsl(domain);

            Assert.Equal(shouldBeEnforced, result);
        }
Example #2
0
        public static bool EnforceSsl(string domain = "")
        {
            if(string.IsNullOrWhiteSpace(domain))
            {
                domain = GetDomain();
            }

            var logger = Log.Logger;
            var serializer = GetSerializer();
            var check = new SslDomainCheck(logger, serializer);
            return check.EnforceSsl(domain);
        }