public void Should_Keep_Numbers_Out_When_Decrypt() { var cypher = new CesarCypher(); //Assert.Equal("a1b2c3d4e5f6g7h8i9j0", cypher.Decrypt("d1e2f3g4h5i6j7k8l9m0")); Assert.Equal("the quick brown fox jumps over the lazy dog", cypher.Decrypt("wkh txlfn eurzq ira mxpsv ryhu wkh odcb grj")); }
public void DecryptArgumentoNull() { string textoEntrada = null; var cesarCypher = new CesarCypher(); var excecao = Assert.Throws <ArgumentNullException>( () => cesarCypher.Decrypt(textoEntrada) ); }
public void DecryptTextoComAcento() { string textoEntrada = "Chão"; var cesarCypher = new CesarCypher(); Assert.Throws <ArgumentOutOfRangeException>( () => cesarCypher.Decrypt(textoEntrada) ); }
public void DecryptTextoVazio() { string textoEntrada = ""; string textoEsperado = ""; var cesarCypher = new CesarCypher(); string textoDecifrado = cesarCypher.Decrypt(textoEntrada); Assert.Equal(textoDecifrado, textoEsperado); }
public void DecryptTextoComNumerosEspacos() { string textoEntrada = "aWkh1 Txlfn2 Eurz3 Ira4 Mxpsv5 Ryhu6 Wkh7 Odcb8 Grj9 0"; string textoEsperado = "xthe1 quick2 brow3 fox4 jumps5 over6 the7 lazy8 dog9 0"; var cesarCypher = new CesarCypher(); string textoDecifrado = cesarCypher.Decrypt(textoEntrada); Assert.Equal(textoDecifrado, textoEsperado); }
public void CryptTextoComNumerosEspacos() { string textoEntrada = "The1 Quick2 Brow3 Fox4 Jumps5 Over6 The7 Lazy8 Dog9 0"; string textoEsperado = "wkh1 txlfn2 eurz3 ira4 mxpsv5 ryhu6 wkh7 odcb8 grj9 0"; var cesarCypher = new CesarCypher(); string textoCifrado = cesarCypher.Crypt(textoEntrada); Assert.Equal(textoCifrado, textoEsperado); }
public void Should_Not_Accept_Argument_Out_Range_When_Decrypt() { var cypher = new CesarCypher(); Assert.Throws <ArgumentOutOfRangeException>(() => cypher.Decrypt("ç")); Assert.Throws <ArgumentOutOfRangeException>(() => cypher.Decrypt("é")); Assert.Throws <ArgumentOutOfRangeException>(() => cypher.Decrypt("&")); Assert.Throws <ArgumentOutOfRangeException>(() => cypher.Decrypt("*")); Assert.Throws <ArgumentOutOfRangeException>(() => cypher.Decrypt("%")); Assert.Throws <ArgumentOutOfRangeException>(() => cypher.Decrypt(";")); Assert.Throws <ArgumentOutOfRangeException>(() => cypher.Decrypt("ª")); Assert.Throws <ArgumentOutOfRangeException>(() => cypher.Decrypt("º")); }
public void Should_Keep_Numbers_Out_When_Decrypt() { var cypher = new CesarCypher(); Assert.Equal("a1b2c3d4e5f6g7h8i9j0", cypher.Decrypt("d1e2f3g4h5i6j7k8l9m0")); }
public void Should_Be_Lower_When_DeCrypt() { var cypher = new CesarCypher(); Assert.Equal("a1b2c3d4e5f6g7h8i9j0", cypher.Decrypt("d1e2f3g4h5i6j7k8l9m0".ToUpper())); }
public void Should_Decrypt_Message() { var cypher = new CesarCypher(); Assert.Equal("the quick brown fox jumps over the lazy dog", cypher.Decrypt("wkh txlfn eurzq ira mxpsv ryhu wkh odcb grj")); }
public void Should_Not_Accept_Special_Characteres_When_Decrypt() { var cypher = new CesarCypher(); Assert.Throws <ArgumentOutOfRangeException>(() => cypher.Decrypt("><!@#*&%")); }
public void Example_Crypt() { var cypher = new CesarCypher(); Assert.Equal("wkh txlfn eurzq ira mxpsv ryhu wkh odcb grj", cypher.Crypt("the quick brown fox jumps over the lazy dog")); }
public void Should_Not_Accept_Argument_Out_Of_Range_When_Crypt() { var cypher = new CesarCypher(); Assert.Throws <ArgumentOutOfRangeException>(() => cypher.Crypt("é palhaçada")); }
public void Teste_Decrypt() { var cypher = new CesarCypher(); Assert.Equal("teste 123 com espaco xyz", cypher.Decrypt("whvwh 123 frp hvsdfr abc")); }
public void Should_Retun_Numbers_When_Decrypt() { var cypher = new CesarCypher(); Assert.Equal("xyz", cypher.Decrypt("ABC")); }
public void Empty_Message_When_Crypt() { var cypher = new CesarCypher(); Assert.Equal(string.Empty, cypher.Crypt(string.Empty)); }
public void Overflow_When_Crypt() { var cypher = new CesarCypher(); Assert.Equal("zabc", cypher.Crypt("wxyz")); }
public void Teste_Crypt_Maiuscula() { var cypher = new CesarCypher(); Assert.Equal("whvwh frp hvsdfr abc", cypher.Crypt("Teste COM espaco XYZ")); }
public void Underflow_When_Decrypt() { var cypher = new CesarCypher(); Assert.Equal("wxyz", cypher.Decrypt("zabc")); }
public void Teste_Decrypt_Maiuscula() { var cypher = new CesarCypher(); Assert.Equal("teste com espaco xyz", cypher.Decrypt("Whvwh FRP hvsdfr ABC")); }
public void Should_Return_Only_Blank_Spaces_When_Decrypt() { var cypher = new CesarCypher(); Assert.Equal(" ", cypher.Decrypt(" ")); }
public void Teste_Decrypt_Branco() { var cypher = new CesarCypher(); Assert.Equal(" ", cypher.Decrypt(" ")); }
public void Should_Not_Accept_Accentuation_When_Decrypt() { var cypher = new CesarCypher(); Assert.Throws <ArgumentOutOfRangeException>(() => cypher.Decrypt("âãàáêẽèéîĩìíôõòóûũùú")); }
public void Teste_Crypt_Erro_Caracter_Invalido() { var cypher = new CesarCypher(); Assert.Throws <ArgumentOutOfRangeException>(() => cypher.Crypt("Teste COM ç")); }
public void Should_Not_Accept_Special_Char_When_Crypt() { var cypher = new CesarCypher(); Assert.Throws <ArgumentOutOfRangeException>(() => cypher.Crypt("a0ç")); }
public void Should_Ensure_Letter_Or_Number_When_Decrypt() { var cypher = new CesarCypher(); Assert.Throws <ArgumentOutOfRangeException>(() => cypher.Decrypt("é palhaçada")); }
public void Should_Keep_Numbers_Out_When_Crypt() { var cypher = new CesarCypher(); Assert.Equal("d", cypher.Crypt("a")); }
public void Ignore_UpperCase_When_Crypt() { var cypher = new CesarCypher(); Assert.Equal("def", cypher.Crypt("ABC")); }
public void Should_Not_Accept_Null_When_Crypt() { var cypher = new CesarCypher(); Assert.Throws <ArgumentNullException>(() => cypher.Crypt(null)); }
public void Ignore_Spaces_When_Decrypt() { var cypher = new CesarCypher(); Assert.Equal("a b c", cypher.Decrypt("d e f")); }