public void Should_Keep_Numbers_Out_When_Crypt() { var cypher = new CesarCypher(); // Assert.Equal("d1e2f3g4h5i6j7k8l9m0", cypher.Crypt("a1b2c3d4e5f6g7h8i9j0")); Assert.Equal("wkh txlfn eurzq ira mxpsv ryhu wkh odcb grj", cypher.Crypt("the quick brown fox jumps over the lazy dog")); }
public void CryptArgumentoNull() { string textoEntrada = null; var cesarCypher = new CesarCypher(); Assert.Throws <ArgumentNullException>( () => cesarCypher.Crypt(textoEntrada) ); }
public void CryptTextoComAcento() { string textoEntrada = "Chão"; var cesarCypher = new CesarCypher(); Assert.Throws <ArgumentOutOfRangeException>( () => cesarCypher.Crypt(textoEntrada) ); }
public void CryptTextoVazio() { string textoEntrada = ""; string textoEsperado = ""; var cesarCypher = new CesarCypher(); string textoCifrado = cesarCypher.Crypt(textoEntrada); Assert.Equal(textoCifrado, 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 Ignore_UpperCase_When_Crypt() { var cypher = new CesarCypher(); Assert.Equal("def", cypher.Crypt("ABC")); }
public void Should_Ensure_Letter_Or_Number_When_Crypt() { var cypher = new CesarCypher(); Assert.Throws <ArgumentOutOfRangeException>(() => cypher.Crypt("|abc@")); }
public void Should_Keep_Numbers_Out_When_Crypt() { var cypher = new CesarCypher(); Assert.Equal("d1e2f3g4h5i6j7k8l9m0", cypher.Crypt("a1b2c3d4e5f6g7h8i9j0")); }
public void Should_Be_Lower_When_Crypt() { var cypher = new CesarCypher(); Assert.Equal("d1e2f3g4h5i6j7k8l9m0", cypher.Crypt("a1b2c3d4e5f6g7h8i9j0".ToUpper())); }
public void Should_Crypt_Message() { 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_Return_Only_Blank_Spaces_When_Crypt() { var cypher = new CesarCypher(); Assert.Equal(" ", cypher.Crypt(" ")); }
public void Overflow_When_Crypt() { var cypher = new CesarCypher(); Assert.Equal("zabc", cypher.Crypt("wxyz")); }
public void Should_Retun_Numbers_When_Crypt() { var cypher = new CesarCypher(); Assert.Equal("def", cypher.Crypt("ABC")); }
public void Should_Return_Empty_When_Crypt() { var cypher = new CesarCypher(); Assert.Empty(cypher.Crypt(string.Empty)); }
public void Ignore_Spaces_When_Crypt() { var cypher = new CesarCypher(); Assert.Equal("d e f", cypher.Crypt("a b c")); }
public void Empty_Message_When_Crypt() { var cypher = new CesarCypher(); Assert.Equal(string.Empty, cypher.Crypt(string.Empty)); }
public void Should_Keep_White_Space_When_Crypt() { var cypher = new CesarCypher(); Assert.Equal("d 1e2f3g4h5i6j7k8l9m0abc", cypher.Crypt("a 1b2c3d4e5f6g7h8i9j0xyz")); }
public void Should_Not_Accept_Argument_Out_Of_Range_When_Crypt() { var cypher = new CesarCypher(); Assert.Throws <ArgumentOutOfRangeException>(() => cypher.Crypt("é palhaçada")); }
public void Should_Not_Accept_Null_When_Crypt() { Assert.Throws <ArgumentNullException>(() => cypher.Crypt(null)); }
public void Should_Not_Accept_Accentuation_When_Crypt() { var cypher = new CesarCypher(); Assert.Throws <ArgumentOutOfRangeException>(() => cypher.Crypt("âãàáêẽèéîĩìíôõòóûũùú")); }
public void Teste_Crypt() { var cypher = new CesarCypher(); Assert.Equal("whvwh 123 frp hvsdfr abc", cypher.Crypt("teste 123 com espaco xyz")); }
public void Should_Not_Accept_Special_Char_When_Crypt() { var cypher = new CesarCypher(); Assert.Throws <ArgumentOutOfRangeException>(() => cypher.Crypt("a0ç")); }
public void Teste_Crypt_Maiuscula() { var cypher = new CesarCypher(); Assert.Equal("whvwh frp hvsdfr abc", cypher.Crypt("Teste COM espaco XYZ")); }
public void Should_Keep_Numbers_Out_When_Crypt() { var cypher = new CesarCypher(); Assert.Equal("d", cypher.Crypt("a")); }
public void Teste_Crypt_Branco() { var cypher = new CesarCypher(); Assert.Equal(" ", cypher.Crypt(" ")); }
public void Should_Not_Accept_Null_When_Crypt() { var cypher = new CesarCypher(); Assert.Throws <ArgumentNullException>(() => cypher.Crypt(null)); }
public void Teste_Crypt_Erro_Caracter_Invalido() { var cypher = new CesarCypher(); Assert.Throws <ArgumentOutOfRangeException>(() => cypher.Crypt("Teste COM ç")); }