50onRed / mock-jedis

Mock Jedis is a library for mocking out Jedis clients
MIT License
82 stars 47 forks source link

Add support for sorted sets, lrange and transactions #43

Open felipecsl opened 6 years ago

felipecsl commented 6 years ago

Fixes #20

This adds support for:

If you don't mind, I've converted the files from tab to 2-space indentation and removed final from parameters and local variables to clean up the code. If you feel strongly, I can add those back, but I deem them unnecessary :)

Also a couple other housekeeping Gradle improvements, added unit tests.

If you add ?w=1 to the PR url, it's gonna ignore whitespace-only changes. (easier to review)

It's worth mentioning that the time complexity is not quite the same as the Redis default implementation (O(log(N)+M) versus O(N) in this implementation), but I guess that's fine for a test-only library