Ejemplo n.º 1
0
 public void TestCaesar32EncodeA()
 {
     string testo = "ABBA";
     string codice = "D";
     string expected = "QVADDPH7";
     Caesar32 crypt = new Caesar32();
     string codifica = crypt.Encode(testo, codice);
     Assert.AreEqual(expected, codifica);
 }
Ejemplo n.º 2
0
 public void TestCaesar32EncodeNumber()
 {
     string text = "ABBA";
     int cypher = 3;
     string ris = "QVADDPH7";
     Caesar32 crypt = new Caesar32();
     string encoder = crypt.Encode(text, cypher);
     Assert.AreEqual(encoder, ris);
 }
Ejemplo n.º 3
0
 public void TestCaesar32DecodeLetter()
 {
     string text = "QVADDPH7";
     string cypher = "D";
     string ris = "ABBA";
     Caesar32 crypt = new Caesar32();
     string decoder = crypt.Decode(text, cypher);
     Assert.AreEqual(decoder, ris);
 }
Ejemplo n.º 4
0
 public void TestCaesar32DecodeError()
 {
     string text = "IRCAKRA=";
     string cypher = "D";
     string ris = "ABBA";
     Caesar32 crypt = new Caesar32();
     string decode = crypt.Decode(text, cypher);
     Assert.AreEqual(decode, ris);
 }
Ejemplo n.º 5
0
 public async Task TestCaesar32DecodeAsyncOk()
 {
     string text = "QVADDPH7";
     string cypher = "D";
     string ris = "ABBA";
     Caesar32 crypt = new Caesar32();
     string decode =await crypt.DecodeAsync(text, cypher);
     Assert.AreEqual(decode, ris);
 }
Ejemplo n.º 6
0
 public void TestCaesar32EncodeOk()
 {
     string text = "ABBA";
     string cypher = "D";
     string ris = "QVADDPH7";
     Caesar32 crypt = new Caesar32();
     string encode = crypt.Encode(text, cypher);
     Assert.AreEqual(encode, ris);
 }