public void TestAddingKeyToLookupShouldAddIfNonExistantAndIgnoreIfAlreadyExistant() { PublicKeyResolver.Add("123456789", "asdfghjkl"); Assert.AreEqual(1, PublicKeyResolver.PublicKeyLookup.Count); PublicKeyResolver.Add("123456789", "asdfghjkl"); Assert.AreEqual(1, PublicKeyResolver.PublicKeyLookup.Count); }
public void TestReadingKeyShouldReturnKeyIfFound() { PublicKeyResolver.Add("123456789", "asdfghjkl"); Assert.AreEqual("asdfghjkl", PublicKeyResolver.GetPublicKey("123456789")); }
public IActionResult AddPublicKey(string kvkNumber, [FromForm] string publicKey) { PublicKeyResolver.Add(kvkNumber, publicKey); return(new OkResult()); }