コード例 #1
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);
 }
コード例 #2
0
ファイル: CypherTests.cs プロジェクト: Tacconi/CryptoAlpha
 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);
 }
コード例 #3
0
ファイル: CypherTests.cs プロジェクト: Tacconi/CryptoAlpha
 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);
 }
コード例 #4
0
ファイル: CypherTests.cs プロジェクト: Gheorg/CryptoAlpha
 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);
 }