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); }
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)); }