public void CipherTest() { var cipherConverter = new CipherConverter(); var request = new CipherRequest() { UserInput = "Test" }; var result = cipherConverter.EncryptWord(request); Assert.AreEqual(result.Output, "QBPQ"); }
public ActionResult CipherInput(CipherModel request) { if (ModelState.IsValid) { var cipherConverter = new CipherConverter(); var cipherData = new CipherRequest(); cipherData.UserInput = request.UserInput; var result = cipherConverter.EncryptWord(cipherData); return(View("CipherOutput", result)); } else { return(View(request)); } }