Comments (18)
Thanks @eugenio1590, I'll check it out.
from kotlin-faker.
I get the same error. You can close this issue for now if you want. Thanks for your help.
from kotlin-faker.
Hi. Thanks for reporting. I haven't tried using it in an Android project, but I'll look into it.
from kotlin-faker.
Hi. Thanks for reporting. I haven't tried using it in an Android project, but I'll look into it.
Perfect. Thanks.
from kotlin-faker.
I can't seem to reproduce this issue using latest Android Studio
I used this sample project to run the tests: https://github.com/android/testing-samples/tree/master/unit/BasicSample
And the test:
public class EmailValidatorTest {
@Test
public void testKotlinFaker() {
Faker faker = new Faker();
String name = faker.getInternet().email();
System.out.println("name = " + name);
}
}
prints out:
name = [email protected]
Process finished with exit code 0
Tried running both from command line and the IDE.
Can you provide a minimal reproducible example for the issue you're facing?
from kotlin-faker.
Hi @serpro69 , I replicated this issue on my android project but I do not have time now to replicate using another project of Android. I am sorry for that. But If you see this "test" project you can see the same problem. This is a maven project with spring. Please let me know if it is a missing dependency or if I need to use another version of the Faker library. Thanks.
from kotlin-faker.
I couldn't reproduce the issue with your test project either.
Here's the full output of the test run (I've added a printout for the name
variable) which you can also see in the console output.
✓ ~/Projects/personal/clones/issues/maven-kotlin-faker→ ./mvnw clean test [17:11:16]
[INFO] Scanning for projects...
[INFO]
[INFO] --------------------------< com.example:demo >--------------------------
[INFO] Building demo 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ demo ---
[INFO] Deleting /home/sergio/Projects/personal/clones/issues/maven-kotlin-faker/target
[INFO]
[INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ demo ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ demo ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- kotlin-maven-plugin:1.3.61:compile (compile) @ demo ---
[INFO] Applied plugin: 'spring'
[INFO]
[INFO] --- maven-resources-plugin:3.1.0:testResources (default-testResources) @ demo ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/sergio/Projects/personal/clones/issues/maven-kotlin-faker/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ demo ---
[INFO] Changes detected - recompiling the module!
[INFO]
[INFO] --- kotlin-maven-plugin:1.3.61:test-compile (test-compile) @ demo ---
[INFO] Applied plugin: 'spring'
[INFO]
[INFO] --- maven-surefire-plugin:2.22.2:test (default-test) @ demo ---
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running com.example.demo.DemoApplicationTests
[email protected]
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.058 s - in com.example.demo.DemoApplicationTests
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.051 s
[INFO] Finished at: 2020-02-06T17:11:25+01:00
[INFO] ------------------------------------------------------------------------
from kotlin-faker.
Could this #20 be related? Can you try explicitly setting the jackson-module-kotlin
version to 2.10.1
?
from kotlin-faker.
Ok, I am using Intellij to run the tests. I can try using the command line to verify it.
from kotlin-faker.
I tried both actually. But yes, it could be something wrong with your intellij setup.
from kotlin-faker.
I don't mind keeping it open for awhile, but I need more details to reproduce it.
I'll try to reproduce it on a VM box when I have some time. If it works there as well it must be something with your setup.
from kotlin-faker.
I've tried to reproduce it on a VM box with a spring-boot maven project and it works there as well, hence closing this as not reproducible.
Feel free to re-open if you can provide more details on how to reproduce this.
from kotlin-faker.
I ran into the same problem. I think this is a bug that only happens in the windows environment.
@serpro69 Is it possible to re-open this?
from kotlin-faker.
@mcheung610 , I've re-opened this, but I'm not sure how to reproduce it. I don't have a windows machine and virtualbox was broken in Ubuntu 2004 for me last time that I checked it. I'll try to check it once more when I have the time, but feel free to submit a PR for the fix also.
What version are you using?
from kotlin-faker.
@mcheung610 / @eugenio1590 , I've made another fix for android in #90 . Can you try to run latest version and see if this issue still persists with that fix?
from kotlin-faker.
This issue has been w/o action for quite some time now, so I'm going to close it.
If you still face problems with android @mcheung610 / @eugenio1590 - feel free to re-open.
Thanks
from kotlin-faker.
I have a maybe similar problem. By invoke faker.address.city()
the stack trace is the result. It is clear to me that the compose tooling framework is a bit different to the instrumentation test. The question is why the others work but not the city()
?
from kotlin-faker.
Hi @drindt ,
That looks strange. address.city()
makes a call to Name
provider (ref:
kotlin-faker/core/src/main/resources/locales/en/address.yml
Lines 1832 to 1836 in 97ff39e
I suppose the "others" that do work for you don't invoke functions from other providers (like in this case
address.city()
will call i.e. name.firstName()
), which is why they might work and city()
not. The question is, why city()
doesn't work... :)Would you be able to provide an example repo where this can be reproduced?
from kotlin-faker.
Related Issues (20)
- RandomClassProvider doesn't handle constructorless types correctly in all instances HOT 1
- Allow random to be used with unique HOT 1
- Regexify generates invalid value HOT 2
- Regexify should take Regex as an argument HOT 1
- Regexify fails with StackOverflowError HOT 5
- random.nextLong(bound: Long) also returns negative values HOT 3
- Suggestion: internet.ipv4() and internet.ipv6() HOT 4
- Support inner classes in RandomClassProvider
- Remove all deprecated functionality in faker 2.0
- Split core Faker into sub-fakers by categories
- Allow creating custom fakers / generators
- kotlin-faker 2.0 - Breaking Changes HOT 1
- Suggestion: Add a Database Provider HOT 6
- Add Kotlin BCV to keep changes to public API under control
- Add BOM to manage dependencies HOT 2
- Figure out versioning for submodules
- Kotlin Multiplatform Support HOT 11
- Fix publishing of snapshots
- Random country code returned for address with locale `en-US` HOT 12
- Add faker extension module for kotest Arbs
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kotlin-faker.