public async Task TestMethod2() { await GenerateKeys.GenerateKeyRing("Test User <*****@*****.**>", new char[] { 't', 'e', 's', 't', 'u', 's', 'e', 'r' }, @"C:\Users\John\BcPGP\"); Assert.IsTrue(File.Exists(Path.Combine(@"C:\Users\John\BcPGP\", "*****@*****.**"))); Assert.IsTrue(File.Exists(Path.Combine(@"C:\Users\John\BcPGP\", "*****@*****.**"))); }
public async Task TestMethod1() { await GenerateKeys.GenerateKeyRing("John W. Davidson <*****@*****.**>", new char[] { 'W', 'i', '7', 'a', 'r', 'd', 'r', 'y', '!', 'T', 'e', 's', 't' }, @"C:\Users\John\BcPGP\"); Assert.IsTrue(File.Exists(Path.Combine(@"C:\Users\John\BcPGP\", "jwdavidson+BcPGPTest@gmail_com_public.asc"))); Assert.IsTrue(File.Exists(Path.Combine(@"C:\Users\John\BcPGP\", "jwdavidson+BcPGPTest@gmail_com_secret.asc"))); }
public async Task TestMethod2() { if (!m_keysGenerated) { await GenerateKeys.GenerateKeyRing("John W. Davidson <*****@*****.**>", new char[] { 'W', 'i', '7', 'a', 'r', 'd', 'r', 'y', '!', 'T', 'e', 's', 't' }, @"C:\Users\John\BcPGP\"); m_keysGenerated = true; } ImportKey impKey = new ImportKey(); using (KeyStoreDB keyDB = new KeyStoreDB()) { int cnt = impKey.ImportSecretKey("*****@*****.**", @"C:\Users\John\BcPGP", keyDB); Assert.IsTrue(cnt == 1); } }