-
Notifications
You must be signed in to change notification settings - Fork 24
Split redis in 2 repositories #216
Split redis in 2 repositories #216
Conversation
Codecov Report
@@ Coverage Diff @@
## development #216 +/- ##
==============================================
- Coverage 49.86% 49.57% -0.3%
==============================================
Files 252 254 +2
Lines 10760 10854 +94
==============================================
+ Hits 5366 5381 +15
- Misses 5394 5473 +79
Continue to review full report at Codecov.
|
check the conflicts with the snowy PR please |
67f6761
to
235bedf
Compare
@@ -19,7 +19,7 @@ public void Register(IContainerBuilder containerBuilder) | |||
case RedisDbConfig.Provider: | |||
{ | |||
containerBuilder.RegisterSingleton<RedisDbConfig>(); | |||
containerBuilder.RegisterSingleton<IRepository, RedisDbRepository>(); | |||
containerBuilder.RegisterSingleton<IRepository, RedisDbJsonRepository>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do you inject RedisDbBinaryRepository
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, replacing RedisDbJsonRepository with RedisDbBinaryRepository, or do it need to change at the runtime?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By configuration, like you choose RocksDb, or Redis
@@ -14,14 +14,14 @@ | |||
namespace NeoSharp.Persistence.Redis.Tests | |||
{ | |||
[TestClass] | |||
public class UtRedisDbRepository : TestBase | |||
public class UtRedisDbBinaryRepository : TestBase | |||
{ | |||
[TestMethod] | |||
public async Task GetIndexHeight_NoValueFound_ReturnsZero() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can join all the unit test of IRepository together, like in a foreach?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean to merge all Ut___Repository classes and merge the methods?
Rocks mocking is really different than Redis mocking, so it will probably makes the code less organised and readable. Don't you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inject the provider according to the configuration file
b83e3e5
to
87d251d
Compare
@melanke there are some conflicts here |
87d251d
to
1b69e48
Compare
Splitting RedisDbRepository into RedisDbBinaryRepository and RedisDbJsonRepository, no need for an if