private X509Certificate2 GetCertificate() { const string certificatePath = "IdentityServer4.RavenDB.Storage.Tests.DocumentStoreHolderTests.certificate.txt"; var cert = EmbeddedResourceHelper.GetFileContent(certificatePath); var bytes = Convert.FromBase64String(cert); return(new X509Certificate2(bytes)); }