Ejemplo n.º 1
0
 public void TestCaesarEncryptNumber()
 {
     string text = "ABBA";
     int cypher = 3;
     string ris = "DEED";
     Caesar crypt = new Caesar();
     string encoder = crypt.Encode(text, cypher);
     Assert.AreEqual(encoder, ris);
 }
Ejemplo n.º 2
0
 public void TestCaesarDecodeEDDS()
 {
     string testo = "EDDS";
     string codice = "E";
     string expected = "AZZO";
     Caesar crypt = new Caesar();
     string codifica = crypt.Decode(testo, codice);
     Assert.AreEqual(expected, codifica);
 }
Ejemplo n.º 3
0
 public void TestCaesarDecryptNumber()
 {
     string text = "EDDS";
     int cypher = 4;
     string ris = "AZZO";
     Caesar crypt = new Caesar();
     string decoder = crypt.Decode(text, cypher);
     Assert.AreEqual(decoder, ris);
 }
Ejemplo n.º 4
0
 public void TestCaesar()
 {
     string testo = "ABBA";
     string codice = "D";
     string ris = "EFFE";
     Caesar crypt = new Caesar();
     string codifica = crypt.Encode(testo, codice);
     Assert.AreEqual(codifica,ris);
 }
Ejemplo n.º 5
0
 public void TestCaesarDecodeDEED()
 {
     string testo = "DEED";
     string codice = "D";
     string expected = "ABBA";
     Caesar crypt = new Caesar();
     string codifica = crypt.Decode(testo, codice);
     Assert.AreEqual(expected, codifica);
 }
Ejemplo n.º 6
0
 public void TestCaesarDecodeError()
 {
     string text = "ABBA";
     string cypher = "D";
     string ris = "DEED";
     Caesar crypt = new Caesar();
     string decode = crypt.Decode(text, cypher);
     Assert.AreEqual(decode, ris);
 }
Ejemplo n.º 7
0
 public async Task TestCaesarDecodeAsyncOk()
 {
     string text = "ABBA";
     string cypher = "D";
     string ris = "XYYX";
     Caesar crypt = new Caesar();
     string decode =await crypt.DecodeAsync(text, cypher);
     Assert.AreEqual(decode, ris);
 }
Ejemplo n.º 8
0
 public async Task TestCaesarEncodeAsyncOk()
 {
     string text = "ABBA";
     string cypher = "D";
     string ris = "DEED";
     Caesar crypt = new Caesar();
     string codifica = await crypt.EncodeAsync(text, cypher);
     Assert.AreEqual(codifica, ris);
 }
Ejemplo n.º 9
0
 public void TestCaesarEncodeOk()
 {
     string text = "ABBA";
     string cypher = "D";
     string ris = "DEED";
     Caesar crypt = new Caesar();
     string codifica = crypt.Encode(text, cypher);
     Assert.AreEqual(codifica, ris);
 }
Ejemplo n.º 10
0
 public void TestCaesarEncodeBCCB()
 {
     string testo = "BCCB";
     string codice = "D";
     string expected = "EFFE";
     Caesar crypt = new Caesar();
     string codifica = crypt.Encode(testo, codice);
     Assert.AreEqual(expected, codifica);
 }