public void ExtractEndpoint() { var ownContact = new OwnEndpoint(Valid.ReceivingEndpoint.PublicEndpoint, Valid.ReceivingEndpoint.SigningKeyPrivateMaterial, Valid.ReceivingEndpoint.EncryptionKeyPrivateMaterial); var cryptoServices = new Mocks.MockCryptoProvider(); var entry = ownContact.CreateAddressBookEntry(cryptoServices); var endpoint = entry.ExtractEndpoint(cryptoServices); Assert.That(endpoint, Is.EqualTo(ownContact.PublicEndpoint)); }
public void ExtractEndpoint() { var ownContact = new OwnEndpoint(Valid.ReceivingEndpoint.SigningKey, Valid.ReceivingEndpoint.EncryptionKey); var cryptoServices = new CryptoSettings(SecurityLevel.Minimum); var entry = ownContact.CreateAddressBookEntry(cryptoServices); var endpoint = entry.ExtractEndpoint(); Assert.Equal(ownContact.PublicEndpoint, endpoint); }
public void CreateAddressBookEntryNullInput() { var ownContact = new OwnEndpoint(Valid.ReceivingEndpoint.PublicEndpoint, Valid.ReceivingEndpoint.SigningKeyPrivateMaterial, Valid.ReceivingEndpoint.EncryptionKeyPrivateMaterial); Assert.Throws <ArgumentNullException>(() => ownContact.CreateAddressBookEntry(null)); }
public void CreateAddressBookEntryNullInput() { var ownContact = new OwnEndpoint(Valid.ReceivingEndpoint.SigningKey, Valid.ReceivingEndpoint.EncryptionKey); Assert.Throws<ArgumentNullException>(() => ownContact.CreateAddressBookEntry(null)); }