public void Ctor_Should_Not_Throw_Exception_When_PublicKeyHasNoPrivateKey() { var publicKey = _fixture.Create <RSACryptoServiceProvider>(); var algorithm = new RS256Algorithm(publicKey); algorithm.Should().NotBeNull(); }
public void Ctor_Should_Not_Throw_Exception_When_Certificate_Has_No_PrivateKey(string publicKey) { var bytes = Encoding.ASCII.GetBytes(publicKey); var certificate = new X509Certificate2(bytes); var algorithm = new RS256Algorithm(certificate); algorithm.Should().NotBeNull(); }