test/src/crypto/crypto_store/crypto_store_test.cpp
TEST_F(CryptoStoreTest, generateEd25519KeypairSeedSuccess) {
  EXPECT_OUTCOME_FALSE(
      err, crypto_store->findEd25519Keypair(key_type, ed_pair.public_key));
  ASSERT_EQ(err, CryptoStoreError::KEY_NOT_FOUND);

  auto &&pair = crypto_store->generateEd25519Keypair(key_type, seed);
  ASSERT_EQ(pair, ed_pair);

  // check that created pair is now contained in memory
  EXPECT_OUTCOME_TRUE(
      found, crypto_store->findEd25519Keypair(key_type, pair.public_key));
  ASSERT_EQ(found, pair);
  // not stored on disk
  ASSERT_FALSE(isStoredOnDisk(key_type, pair.public_key));
}
/**
 * @given cryptostore instance, type, seed and predefined key pair
 * @when generateEd25519Keypair is called
 * @then method call succeeds and result matches predefined key pair
 * @and generated key pair is stored in memory
 */
@given cryptostore instance, type, seed and predefined key pair
@when generateEd25519Keypair is called
@then method call succeeds and result matches predefined key pair
@and generated key pair is stored in memory
@given cryptostore instance type seed and predefined key pair @when generateEd25519Keypair is called @then method call succeeds and result matches predefined key pair @and generated key pair is stored in memory
TEST_F(CryptoStoreTest, generateEd25519KeypairSeedSuccess) {
  EXPECT_OUTCOME_FALSE(
      err, crypto_store->findEd25519Keypair(key_type, ed_pair.public_key));
  ASSERT_EQ(err, CryptoStoreError::KEY_NOT_FOUND);
  auto &&pair = crypto_store->generateEd25519Keypair(key_type, seed);
  ASSERT_EQ(pair, ed_pair);
  EXPECT_OUTCOME_TRUE(
      found, crypto_store->findEd25519Keypair(key_type, pair.public_key));
  ASSERT_EQ(found, pair);
  ASSERT_FALSE(isStoredOnDisk(key_type, pair.public_key));
}
TEST_F ( CryptoStoreTest , generateEd25519KeypairSeedSuccess ) { EXPECT_OUTCOME_FALSE ( err , crypto_store -> findEd25519Keypair ( key_type , ed_pair . public_key ) ) ; ASSERT_EQ ( err , CryptoStoreError :: KEY_NOT_FOUND ) ; auto && pair = crypto_store -> generateEd25519Keypair ( key_type , seed ) ; ASSERT_EQ ( pair , ed_pair ) ; EXPECT_OUTCOME_TRUE ( found , crypto_store -> findEd25519Keypair ( key_type , pair . public_key ) ) ; ASSERT_EQ ( found , pair ) ; ASSERT_FALSE ( isStoredOnDisk ( key_type , pair . public_key ) ) ; }
@given cryptostore instance, type, seed and predefined key pair
 @when generateEd25519Keypair is called
 @then method call succeeds and result matches predefined key pair
 @and generated key pair is stored in memory
@given cryptostore instance type seed and predefined key pair @when generateEd25519Keypair is called @then method call succeeds and result matches predefined key pair @and generated key pair is stored in memory
// check that created pair is now contained in memory // not stored on disk