Example #1
0
 public void Encode_with_a_not_coprime_to_m()
 {
     Assert.Throws <ArgumentException>(() => AffineCipher.Encode("This is a test.", 6, 17));
 }
Example #2
0
 public void Encode_yes()
 {
     Assert.Equal("xbt", AffineCipher.Encode("yes", 5, 7));
 }
Example #3
0
 public void Encode_deep_thought()
 {
     Assert.Equal("iynia fdqfb ifje", AffineCipher.Encode("Truth is fiction.", 5, 17));
 }
Example #4
0
 public void Encode_all_the_letters()
 {
     Assert.Equal("swxtj npvyk lruol iejdc blaxk swxmh qzglf", AffineCipher.Encode("The quick brown fox jumps over the lazy dog.", 17, 33));
 }
Example #5
0
 public void Encode_numbers()
 {
     Assert.Equal("jqgjc rw123 jqgjc rw", AffineCipher.Encode("Testing,1 2 3, testing.", 3, 4));
 }
Example #6
0
 public void Encode_mindblowingly()
 {
     Assert.Equal("rzcwa gnxzc dgt", AffineCipher.Encode("mindblowingly", 11, 15));
 }
Example #7
0
 public void Encode_o_m_g()
 {
     Assert.Equal("hjp", AffineCipher.Encode("O M G", 25, 47));
 }
Example #8
0
 public void Encode_omg()
 {
     Assert.Equal("lvz", AffineCipher.Encode("OMG", 21, 3));
 }
Example #9
0
 public void Encode_no()
 {
     Assert.Equal("fu", AffineCipher.Encode("no", 15, 18));
 }