Exemple #1
0
        public void TestAddingKeyToLookupShouldAddIfNonExistantAndIgnoreIfAlreadyExistant()
        {
            PublicKeyResolver.Add("123456789", "asdfghjkl");
            Assert.AreEqual(1, PublicKeyResolver.PublicKeyLookup.Count);

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