A simple xUnit C# test showing how to verify a certificate for a domain has at least 30 days before it expires.
This sample is in response to my tweet on using automated tests to check for soon-to-be-expired certs(RTs appreciated). Here's the C# code to do it.
If this ends up helping you, please give it a star to help others find it. Thanks!