public void CreateAuthenticatedEncryptorInstance_should_return_null_if_configuration_is_null() { var sut = new RsaEncryptorFactory(NullLoggerFactory.Instance); var key = new RsaSecurityKey(RSA.Create()); Assert.Null(sut.CreateAuthenticatedEncryptorInstance(key, null)); }
public void CreateEncryptorInstance_should_return_null_if_key_descriptor_not_RsaEncryptorDescriptor() { var sut = new RsaEncryptorFactory(NullLoggerFactory.Instance); var decriptiorMock = new Mock <IAuthenticatedEncryptorDescriptor>(); var keyMock = new Mock <IKey>(); keyMock.SetupGet(m => m.Descriptor).Returns(decriptiorMock.Object); Assert.Null(sut.CreateEncryptorInstance(keyMock.Object)); }