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 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 DecryptArgumentoNull() { string textoEntrada = null; var cesarCypher = new CesarCypher(); var excecao = Assert.Throws <ArgumentNullException>( () => cesarCypher.Decrypt(textoEntrada) ); }
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 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_Return_Only_Blank_Spaces_When_Decrypt() { var cypher = new CesarCypher(); Assert.Equal(" ", cypher.Decrypt(" ")); }
public void Should_Not_Accept_Special_Characteres_When_Decrypt() { var cypher = new CesarCypher(); Assert.Throws <ArgumentOutOfRangeException>(() => cypher.Decrypt("><!@#*&%")); }
public void Underflow_When_Decrypt() { var cypher = new CesarCypher(); Assert.Equal("wxyz", cypher.Decrypt("zabc")); }
public void Should_Not_Accept_Null_When_Decrypt() { var cypher = new CesarCypher(); Assert.Throws <ArgumentNullException>(() => cypher.Decrypt(null)); }
public void Should_Ensure_Letter_Or_Number_When_Decrypt() { var cypher = new CesarCypher(); Assert.Throws <ArgumentOutOfRangeException>(() => cypher.Decrypt("é palhaçada")); }
public void Ignore_Spaces_When_Decrypt() { var cypher = new CesarCypher(); Assert.Equal("a b c", cypher.Decrypt("d e f")); }
public void Teste_Decrypt_Maiuscula() { var cypher = new CesarCypher(); Assert.Equal("teste com espaco xyz", cypher.Decrypt("Whvwh FRP hvsdfr ABC")); }
public void Teste_Decrypt_Branco() { var cypher = new CesarCypher(); Assert.Equal(" ", cypher.Decrypt(" ")); }
public void Should_Be_Lower_When_DeCrypt() { var cypher = new CesarCypher(); Assert.Equal("a1b2c3d4e5f6g7h8i9j0", cypher.Decrypt("d1e2f3g4h5i6j7k8l9m0".ToUpper())); }
public void Should_Convert_To_Lower_Case_When_Decrypt() { var cypher = new CesarCypher(); Assert.Equal("xyz", cypher.Decrypt("abc")); }
public void Should_Not_Accept_Accentuation_When_Decrypt() { var cypher = new CesarCypher(); Assert.Throws <ArgumentOutOfRangeException>(() => cypher.Decrypt("âãàáêẽèéîĩìíôõòóûũùú")); }
public void Should_Retun_Numbers_When_Decrypt() { var cypher = new CesarCypher(); Assert.Equal("xyz", cypher.Decrypt("ABC")); }
public void Should_Keep_Numbers_Out_When_Decrypt() { var cypher = new CesarCypher(); Assert.Equal("123", cypher.Decrypt("123")); }
public void Should_Return_Empty_When_Decrypt() { var cypher = new CesarCypher(); Assert.Empty(cypher.Decrypt(string.Empty)); }
public void Should_Keep_White_Space_When_Decrypt() { var cypher = new CesarCypher(); Assert.Equal("a 1b2c3d4e5f6g7h8i9j0xyz", cypher.Decrypt("d 1e2f3g4h5i6j7k8l9m0abc")); }
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_Keep_Frase_Challenge_When_DeCrypt() { // 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_Keep_Numbers_Out_When_Decrypt() { var cypher = new CesarCypher(); Assert.Equal("a1b2c3d4e5f6g7h8i9j0", cypher.Decrypt("d1e2f3g4h5i6j7k8l9m0")); }
public void Teste_Decrypt() { var cypher = new CesarCypher(); Assert.Equal("teste 123 com espaco xyz", cypher.Decrypt("whvwh 123 frp hvsdfr abc")); }