1.1 --- a/java/nekurak.net-lib/test/cz/frantovo/nekurak/util/HashTest.java Mon Jun 07 23:14:02 2010 +0200
1.2 +++ b/java/nekurak.net-lib/test/cz/frantovo/nekurak/util/HashTest.java Wed Jan 12 16:15:37 2011 +0100
1.3 @@ -18,36 +18,36 @@
1.4 */
1.5 public class HashTest {
1.6
1.7 - String 外滩 = "Bund";
1.8 - String 南京东路 = "Nanjing Road East";
1.9 + String 外滩 = "Bund";
1.10 + String 南京东路 = "Nanjing Road East";
1.11
1.12 - @Test
1.13 - public void prázdnýŘetězec() throws Exception {
1.14 - testuj("", "cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e");
1.15 - }
1.16 + @Test
1.17 + public void prázdnýŘetězec() throws Exception {
1.18 + testuj("", "cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e");
1.19 + }
1.20
1.21 - @Test
1.22 - public void prázdnýŘádek() throws Exception {
1.23 - testuj("\n", "be688838ca8686e5c90689bf2ab585cef1137c999b48c70b92f67a5c34dc15697b5d11c982ed6d71be1e1e7f7b4e0733884aa97c3f7a339a8ed03577cf74be09");
1.24 - }
1.25 + @Test
1.26 + public void prázdnýŘádek() throws Exception {
1.27 + testuj("\n", "be688838ca8686e5c90689bf2ab585cef1137c999b48c70b92f67a5c34dc15697b5d11c982ed6d71be1e1e7f7b4e0733884aa97c3f7a339a8ed03577cf74be09");
1.28 + }
1.29
1.30 - @Test(expected = NullPointerException.class)
1.31 - public void nullHodnota() throws Exception {
1.32 - testuj(null, "Při null vstupu má být vyhozena NullPointerException.");
1.33 - }
1.34 + @Test(expected = NullPointerException.class)
1.35 + public void nullHodnota() throws Exception {
1.36 + testuj(null, "Při null vstupu má být vyhozena NullPointerException.");
1.37 + }
1.38
1.39 - @Test
1.40 - public void něco() throws Exception {
1.41 - testuj("Ahoj, jak to jde? :-)", "87e6e3c6487dc5ffee93d05cdc71a196f21181e357e61e1820d652ed9b601e179db92c1aaafc9cf57384498c1a52b89c82714dabdfd30b9eb8c7fd8d3fe53685");
1.42 - }
1.43 + @Test
1.44 + public void něco() throws Exception {
1.45 + testuj("Ahoj, jak to jde? :-)", "87e6e3c6487dc5ffee93d05cdc71a196f21181e357e61e1820d652ed9b601e179db92c1aaafc9cf57384498c1a52b89c82714dabdfd30b9eb8c7fd8d3fe53685");
1.46 + }
1.47
1.48 - @Test
1.49 - public void čeština() throws Exception {
1.50 - testuj("čeština a další unicode – → | @{#@$%${*&…˙×ׄ东方明珠塔“‚&‘‚“‚", "f9750a7f3fa04356510285af61bbdd40b108e04c2abad69130c5929561fa2765e263707147f779ac5f4be348005ce0fc810334822ba0a50f1d5c41719413277e");
1.51 - }
1.52 + @Test
1.53 + public void čeština() throws Exception {
1.54 + testuj("čeština a další unicode – → | @{#@$%${*&…˙×ׄ东方明珠塔“‚&‘‚“‚", "f9750a7f3fa04356510285af61bbdd40b108e04c2abad69130c5929561fa2765e263707147f779ac5f4be348005ce0fc810334822ba0a50f1d5c41719413277e");
1.55 + }
1.56
1.57 - private void testuj(String vstup, String pozadovanyVystup) throws Exception {
1.58 - String vystup = Hash.hashuj(vstup);
1.59 - assertEquals(pozadovanyVystup, vystup);
1.60 - }
1.61 + private void testuj(String vstup, String pozadovanyVystup) throws Exception {
1.62 + String vystup = Hash.hashuj(vstup);
1.63 + assertEquals(pozadovanyVystup, vystup);
1.64 + }
1.65 }