31 |
float lng = (r.nextFloat()*4.7F) + 8.0F; |
float lng = (r.nextFloat()*4.7F) + 8.0F; |
32 |
db.getByLocation(lat, lng); |
db.getByLocation(lat, lng); |
33 |
} |
} |
|
|
|
|
|
|
|
|
|
34 |
} |
} |
35 |
|
|
36 |
void testFindName(int count) throws SQLException { |
void testFindName(int count) throws SQLException { |
38 |
StationDAO db = new StationDAO(); |
StationDAO db = new StationDAO(); |
39 |
|
|
40 |
for (int i=0; i<count; i++) { |
for (int i=0; i<count; i++) { |
41 |
char c1 = ((char)r.nextInt(26)); |
char c1 = getRandomCharacter(); |
42 |
c1 += 'a'; |
char c2 = getRandomCharacter(); |
|
char c2 = ((char)r.nextInt(26)) ; |
|
|
c2 += 'a'; |
|
43 |
|
|
44 |
String search = "" + c1 + c2; |
String search = "" + c1 + c2; |
45 |
System.out.println(search); |
System.out.println(search); |
47 |
db.getByName(search); |
db.getByName(search); |
48 |
} |
} |
49 |
} |
} |
50 |
|
|
51 |
|
private char getRandomCharacter() { |
52 |
|
char c1 = ((char)r.nextInt(26)); |
53 |
|
c1 += 'a'; |
54 |
|
return c1; |
55 |
|
} |
56 |
|
|
57 |
void testFindFavorites(int count) throws SQLException { |
void testFindFavorites(int count) throws SQLException { |
58 |
|
|