Beispiel #1
0
 public void TestCaesar64EncodeA()
 {
     string testo = "ABBA";
     string codice = "D";
     string expected = "hUIBhQ//";
     Caesar64 crypt = new Caesar64();
     string codifica = crypt.Encode(testo, codice);
     Assert.AreEqual(expected, codifica);
 }
 public void TestCaesar64EncodeNumber()
 {
     string text = "ABBA";
     int cypher = 3;
     string ris = "hUIBhQ//";
     Caesar64 crypt = new Caesar64();
     string encoder = crypt.Encode(text, cypher);
     Assert.AreEqual(encoder, ris);
 }
 public void TestCaesar64DecodeLetter()
 {
     string text = "hUIBhQ//";
     string cypher = "D";
     string ris = "ABBA";
     Caesar64 crypt = new Caesar64();
     string decoder = crypt.Decode(text, cypher);
     Assert.AreEqual(decoder, ris);
 }
Beispiel #4
0
 public void TestCaesar64DecodeError()
 {
     string text = "IRCAKRA=";
     string cypher = "D";
     string ris = "ABBA";
     Caesar64 crypt = new Caesar64();
     string decode = crypt.Decode(text, cypher);
     Assert.AreEqual(decode, ris);
 }
Beispiel #5
0
 public async Task TestCaesar64DecodeAsyncOk()
 {
     string text = "hUIBhQ//";
     string cypher = "D";
     string ris = "ABBA";
     Caesar64 crypt = new Caesar64();
     string decode =await crypt.DecodeAsync(text, cypher);
     Assert.AreEqual(decode, ris);
 }
Beispiel #6
0
 public void TestCaesar64EncodeOk()
 {
     string text = "ABBA";
     string cypher = "D";
     string ris = "hUIBhQ//";
     Caesar64 crypt = new Caesar64();
     string encode = crypt.Encode(text, cypher);
     Assert.AreEqual(encode, ris);
 }