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 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));
        }
示例#4
0
        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);
        }
示例#5
0
        public void CreateAddressBookEntryNullInput()
        {
            var ownContact = new OwnEndpoint(Valid.ReceivingEndpoint.PublicEndpoint, Valid.ReceivingEndpoint.SigningKeyPrivateMaterial, Valid.ReceivingEndpoint.EncryptionKeyPrivateMaterial);

            Assert.Throws <ArgumentNullException>(() => ownContact.CreateAddressBookEntry(null));
        }
示例#6
0
 public void CreateAddressBookEntryNullInput()
 {
     var ownContact = new OwnEndpoint(Valid.ReceivingEndpoint.SigningKey, Valid.ReceivingEndpoint.EncryptionKey);
     Assert.Throws<ArgumentNullException>(() => ownContact.CreateAddressBookEntry(null));
 }