30 Commits

Author SHA1 Message Date
Matthew Traughber
f73dd19086 Added ability to get county via zip (en-US locale only) 2018-11-08 14:58:02 -05:00
Pascal Schumacher
6dd2c088b7 unify formatting of tests (remove duplicate blank lines, add missing blank lines...) (#240) 2017-06-19 10:29:53 +10:00
c3ccl3ston
81d9e7635a Add zipCodeByState to Address faker service that returns a valid US state zipcode (#221) 2017-05-19 10:25:00 +10:00
Pascal Schumacher
1ad1adc4ab add Address#fullAddress (#189) 2017-01-24 09:53:30 +11:00
Trever Shick
75751192a1 Add File to Faker from stympy/faker (#155)
* Add File to Faker from stympy/faker

Added File to faker (ported from stympy/faker)
Also, added a test repeater borrowed from https://gist.github.com/fappel/8bcb2aea4b39ff9cfb6e
Updated Internet with slug() (implementation ported from stympy/faker)

* Fix an issue with expression resolution order.

The expression resolution was checking the yml file BEFORE the current object.
That's a problem because of something like 'building_number'.  building_number is
implemented in address by calling numerify(resolve('building_number')) but
the resolution order had yml first instead of the object, so calling address.streetAddress() was returning
 ### my street name instead of a random number like '104 my street name'

This commit fixes this issue

* Add explicit test for street_address

Ensure ### is getting resolved as a number instead of being returned
as ###

* Hopefully fix the Farsi issue for good.
2016-11-11 09:55:29 +11:00
Trever Shick
f574317642 Fix locale chaining. Add yml only resolution. (#133)
* Fix locale chaining. Add yml only resolution.

* Remove assumption, it may be causing travis failures.

* Fix file encoding

* Fix the Integration test for pt locale

* Remove deps change to README.md

* Replace the resolve() method on Faker, uncomment some tests

* Rename unit test to make more sense

* Uncomment commented out tests
2016-10-11 21:41:22 +11:00
Ricky
7210acafc8 made street address number return a number and not a string 2016-05-03 18:08:13 +10:00
Pascal Schumacher
3432539bf1 expand assertion for country (and remove unused logger from AddressTest) (#71)
* expand assertion for country (and remove unused logger from AddressTest)

* expanded regular expression assertion in CompanyTest#testIndustry
2016-04-16 20:19:25 +10:00
Ricky
50518a4de8 expanded assertion for country 2016-04-16 14:55:02 +10:00
Pascal Schumacher
0704d8a538 expanded reg exp assertion in streetAddressNumber test 2016-04-14 19:24:23 +02:00
Ricky
b75995a0c3 expanded reg exp assertion in country test 2016-04-14 22:45:25 +10:00
Ricky
66aa3c6c78 fixing bug related to address city not using random seed 2016-04-14 07:43:12 +10:00
Pascal Schumacher
a91ed04285 AddressTest: modify regular expressions to check city and country so that the tests pass with ruby faker data 2016-04-13 08:38:03 +02:00
Ricky
ecba78d999 Getting JavaFaker to use yml files from ruby faker.
Involves adding in all yml files from ruby faker
Changed en.yml slightly to include internet/images that weren't in the ruby one
Changed credit card values in en.yml file to as JavaFaker doesn't do regexify
Added resolve method in FakeValuesService to deal with resolution of properties that is in the
ruby yml files. This is instead of the simplified composite method.
Added safeFetch method in FakeValueService to deal with null/empty string methods
Added the DefaultingFakeValuesService to deal with defaulting properties to the english locale
2016-04-13 06:48:37 +10:00
Pascal Schumacher
5fb7ce0f4e make AddressTest#testLatitude and AddressTest#testLongitude locale independent 2016-02-08 19:58:04 +01:00
Ricky
dbd8b63435 added Address city method 2015-12-07 09:13:27 +11:00
Ricky
bc77bb533e added space to the regex equality assertion 2015-12-07 08:51:16 +11:00
Ricky
966a693f7c added unit tests for state in the address 2015-11-27 16:41:56 +11:00
Ricky
8620072b5f added timezone support in address 2014-12-22 11:46:58 +11:00
Isaac Sadaqah
0bcfc26b2c Refactor unit tests and update history.md
1. Use hamcrest for testing
2. Change isNumber test to be more inclusive (negative numbers, decimal numbers, etc)
3. Break latitude and longitude range tests
4. Update history.md
2014-06-25 00:27:40 -04:00
Isaac Sadaqah
046f340216 Revert "Merge pull request #3 from isadaqah/isaac/latitude_and_longitude"
This reverts commit 847c925e03d00ec7458ad63e0c1accf6c41be708, reversing
changes made to 1ae07d1b19ec6a73ad6cd412d0882204f88e52bb.
2014-06-25 00:00:57 -04:00
Isaac Sadaqah
655164ee44 Improve latitude and longitude unit tests 2014-06-19 21:54:23 -04:00
Isaac Sadaqah
03f60d0809 Add unit tests for latitude and longitude 2014-06-19 08:26:10 -04:00
Ricky Yim
7a08409f0c deleted old api style of accessing data generation methods 2014-04-27 10:10:22 +10:00
Ricky
8fe2a69eb3 refactored tests to make all the boring tests in the IntegrationTest class 2014-04-24 21:39:34 +10:00
Ricky
7dfba4261b reverted address test back 2014-04-24 21:01:06 +10:00
Ricky
07703e9400 added custom is a number matcher 2014-04-24 17:09:08 +10:00
Ricky
2a55628085 refactored address test 2014-04-24 17:03:24 +10:00
Ricky
004f4bbb97 fixed bug with street address not returning a number 2014-04-24 16:48:03 +10:00
Ricky
f663405c0e refactored to break out to different classes 2014-04-23 16:04:43 +10:00