nitrite-java
                                
                                 nitrite-java copied to clipboard
                                
                                    nitrite-java copied to clipboard
                            
                            
                            
                        Test cases added, Design smell and implementation smell fixed
Test cases
- CollectionFactoryTest.java
- TextFilterTest.java
- MigrationManagerTest.java
- UserAuthenticationServiceTest.java
Refactoring:
- MVStore.java
- In this refactoring, we extracted method getNewChunkWithInitialValues() from storeNow() method to improve readability and complexity.
 
2.PluginManagerTest.java - In this refactoring, we renamed the method testLoadModule2() to testLoadModuleWhenPluginSetNotEmptyThenThrowException() which make more sense about the testing aspect.
- 
SpatialIndex.java - In this refactoring, we introduced explaining variable isIndexScanFilterEmpty for the if condition, so that understanding of condition improves and developer can understand what this condition is making decision on.
 
- 
NitriteCommonFilters.java - Here, methods like and(), or(), not() are not required in class IndexScanFilter but they are used in NitriteFilter class so these methods in parent interface Filter is not required hence pushed down those methods.
 
- 
AESEncryptor.java - Here we identified some properties related to encryption class, which could be extracted to another class to make the code more readable and maintainable. Hence we introduced new class EncryptionProperties which is inherited by AESEnryptor class
 
- 
AESEncryptor.java - Here both classes are using each other in their internal methods which is resulting in bidirectional association. And the thing is in class ‘InMemoryStoreModule’ the method which was responsible for creating bidirectional association was only being used in test case method, nowhere else in project. Hence to resolve this bidirectional association to unidirectional I removed that unnecessary test case and removed that method.
 
One issue shown in Codacy static code analysis is of setting method accessor to true using reflection but it is of test case method which is required.
@parthrajharshadbhaipanchal Thanks for your contributions. I see there are build issues in your PR. Could you please resolve those first?
I could not merge this PR as there are build issues. But I have merged the new test cases you have added. Thanks for the contributions.