test/src/crypto/sr25519/sr25519_provider_test.cpp
TEST_F(SR25519ProviderTest, GenerateBySeedSuccess) {
  EXPECT_OUTCOME_TRUE(seed, SR25519Seed::fromHex(hex_seed));
  EXPECT_OUTCOME_TRUE(public_key, SR25519PublicKey::fromHex(hex_vk));

  // private key is the same as seed
  EXPECT_OUTCOME_TRUE(secret_key, SR25519SecretKey::fromHex(hex_sk));

  auto &&kp = sr25519_provider->generateKeypair(seed);

  ASSERT_EQ(kp.secret_key.toHex(), secret_key.toHex());
  ASSERT_EQ(kp.public_key.toHex(), public_key.toHex());
}
/**
 * @given seed value
 * @when generate key pair by seed
 * @then verifying and secret keys come up with predefined values
 */
@given seed value
@when generate key pair by seed
@then verifying and secret keys come up with predefined values
@given seed value @when generate key pair by seed @then verifying and secret keys come up with predefined values
TEST_F(SR25519ProviderTest, GenerateBySeedSuccess) {
  EXPECT_OUTCOME_TRUE(seed, SR25519Seed::fromHex(hex_seed));
  EXPECT_OUTCOME_TRUE(public_key, SR25519PublicKey::fromHex(hex_vk));
  EXPECT_OUTCOME_TRUE(secret_key, SR25519SecretKey::fromHex(hex_sk));
  auto &&kp = sr25519_provider->generateKeypair(seed);
  ASSERT_EQ(kp.secret_key.toHex(), secret_key.toHex());
  ASSERT_EQ(kp.public_key.toHex(), public_key.toHex());
}
TEST_F ( SR25519ProviderTest , GenerateBySeedSuccess ) { EXPECT_OUTCOME_TRUE ( seed , SR25519Seed :: fromHex ( hex_seed ) ) ; EXPECT_OUTCOME_TRUE ( public_key , SR25519PublicKey :: fromHex ( hex_vk ) ) ; EXPECT_OUTCOME_TRUE ( secret_key , SR25519SecretKey :: fromHex ( hex_sk ) ) ; auto && kp = sr25519_provider -> generateKeypair ( seed ) ; ASSERT_EQ ( kp . secret_key . toHex ( ) , secret_key . toHex ( ) ) ; ASSERT_EQ ( kp . public_key . toHex ( ) , public_key . toHex ( ) ) ; }
@given seed value
 @when generate key pair by seed
 @then verifying and secret keys come up with predefined values
@given seed value @when generate key pair by seed @then verifying and secret keys come up with predefined values
// private key is the same as seed