Jimfs
instancio
Jimfs | instancio | |
---|---|---|
5 | 7 | |
2,380 | 748 | |
0.3% | 1.3% | |
8.5 | 9.7 | |
about 14 hours ago | 7 days ago | |
Java | Java | |
Apache License 2.0 | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Jimfs
-
How to write unit tests in C++ relying on non-code files?
Java has in-memory file systems that are essentially geared for this exact use case, eg jimfs[0]. You create your filesystem and any files you need when your tests are starting up, and your classes talk to them rather than the “real” ones. Maybe a similar project exists for the C++ ecosystem?
[0] https://github.com/google/jimfs
- An in-memory file system for Java
-
Any library you would like to recommend to others as it helps you a lot? For me, mapstruct is one of them. Hopefully I would hear some other nice libraries I never try.
Recently been using JIMFS. Made my tests much faster and cleaner!
- An in memory file system
-
Working and unit testing with temporary files in Java
I use Google's JIMFS "Just In Memory Filesystem" https://github.com/google/jimfs in my unit tests and have been very happy. No need to clean something up that disappears as soon as the test is over. Let's you create unix or windows style filesystems and I've used it to test a disk space healthcheck because you can set a limit to the size of the filesystem it creates. Very flexible and easy to use.
instancio
-
Any library you would like to recommend to others as it helps you a lot? For me, mapstruct is one of them. Hopefully I would hear some other nice libraries I never try.
Instancio for generating test data AssertJ Awaitility Quarkus FluentJdbc: a thin wrapper around jdbc, you can use it as an alternative for JPA and I use it in Quarkus
-
Instancio 2.2.0 released
I've been experimenting a little and will be adding support for method references in the next release. Here's issue link if you want to follow.
-
Java: Automating data setup in unit tests
Properly handling seeds and having reproducible objects was one of the main goals, so it should work as you'd expect. I'd suggest giving it a try and if you run into any issues, just post it on Github discussions.
- Data Generator For Unit Tests
- Instancio: Java library for auto-populating objects in unit tests
What are some alternatives?
Modern Java - A Guide to Java 8 - Modern Java - A Guide to Java 8
Java Faker - Brings the popular ruby faker gem to Java
Lanterna - Java library for creating text-based GUIs
fixture-monkey - Let Fixture Monkey generate test instances including edge cases automatically
OpenRefine - OpenRefine is a free, open source power tool for working with messy data and improving it
datafaker - Generating fake data for the JVM (Java, Kotlin, Groovy) has never been easier!
Joda-Money - Java library to represent monetary amounts.
Mockito - Most popular Mocking framework for unit tests written in Java
LightAdmin - [PoC] Pluggable CRUD UI library for Java web applications
REST Assured - Java DSL for easy testing of REST services
Codename One - Cross-platform framework for building truly native mobile apps with Java or Kotlin. Write Once Run Anywhere support for iOS, Android, Desktop & Web.
atlantafx - Modern JavaFX CSS theme collection with additional controls.