I have handler which creates jwt token with utilization of X509Certificate2. For unit test I need to provide certificate and it is not possible for me take it from the local store. Is there way, how to mock, create or load certificate from the file?
So far I tried BouncingCastle method from this ticket, but with no success. The method ToX509Certificate2() does convert certificate, but without keys. So if this is good way to go, is possible to generate these keys somehow?
Thanks a lot for hints