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 TestCaesar32EncodeError()
 {
     string text = "ABBA";
     string cypher = "D";
     string ris = "IRCAKRA=";
     Caesar32 crypt = new Caesar32();
     string encode = crypt.Encode(text, cypher);
     Assert.AreEqual(encode, ris);
 }
Ejemplo n.º 4
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);
 }