FINERACT-2239: New command processing - resource notes
This commit is contained in:
committed by
Aleksandar Vidakovic
parent
28f63cc20e
commit
02fb166b5b
+9
-16
@@ -19,9 +19,12 @@
|
||||
package com.acme.fineract.portfolio.note.service;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.fineract.infrastructure.core.api.JsonCommand;
|
||||
import org.apache.fineract.infrastructure.core.data.CommandProcessingResult;
|
||||
import org.apache.fineract.portfolio.client.domain.Client;
|
||||
import org.apache.fineract.portfolio.note.data.NoteCreateRequest;
|
||||
import org.apache.fineract.portfolio.note.data.NoteCreateResponse;
|
||||
import org.apache.fineract.portfolio.note.data.NoteDeleteRequest;
|
||||
import org.apache.fineract.portfolio.note.data.NoteDeleteResponse;
|
||||
import org.apache.fineract.portfolio.note.data.NoteUpdateRequest;
|
||||
import org.apache.fineract.portfolio.note.data.NoteUpdateResponse;
|
||||
import org.apache.fineract.portfolio.note.service.NoteWritePlatformService;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
@@ -38,27 +41,17 @@ public class AcmeNoteWritePlatformService implements NoteWritePlatformService, I
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommandProcessingResult createNote(JsonCommand command) {
|
||||
public NoteCreateResponse createNote(NoteCreateRequest request) {
|
||||
throw new UnsupportedOperationException("createNote() is not yet implemented.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createLoanTransactionNote(Long loanTransactionId, String note) {
|
||||
throw new UnsupportedOperationException("createLoanTransactionNote() is not yet implemented.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommandProcessingResult updateNote(JsonCommand command) {
|
||||
public NoteUpdateResponse updateNote(NoteUpdateRequest request) {
|
||||
throw new UnsupportedOperationException("updateNote() is not yet implemented.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommandProcessingResult deleteNote(JsonCommand command) {
|
||||
public NoteDeleteResponse deleteNote(NoteDeleteRequest request) {
|
||||
throw new UnsupportedOperationException("deleteNote() is not yet implemented.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createAndPersistClientNote(Client client, JsonCommand command) {
|
||||
log.warn("createAndPersistClientNote() is intentionally left empty and does nothing.");
|
||||
}
|
||||
}
|
||||
|
||||
-12
@@ -21,7 +21,6 @@ package com.acme.fineract.portfolio.note.starter;
|
||||
import static org.mockito.Mockito.mock;
|
||||
|
||||
import org.apache.fineract.infrastructure.core.config.FineractProperties;
|
||||
import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper;
|
||||
import org.apache.fineract.infrastructure.core.service.database.RoutingDataSource;
|
||||
import org.apache.fineract.infrastructure.core.service.database.RoutingDataSourceServiceFactory;
|
||||
import org.apache.fineract.portfolio.client.domain.ClientRepositoryWrapper;
|
||||
@@ -29,7 +28,6 @@ import org.apache.fineract.portfolio.group.domain.GroupRepository;
|
||||
import org.apache.fineract.portfolio.loanaccount.domain.LoanRepositoryWrapper;
|
||||
import org.apache.fineract.portfolio.loanaccount.domain.LoanTransactionRepository;
|
||||
import org.apache.fineract.portfolio.note.domain.NoteRepository;
|
||||
import org.apache.fineract.portfolio.note.serialization.NoteCommandFromApiJsonDeserializer;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
@@ -38,11 +36,6 @@ import org.springframework.jdbc.core.JdbcTemplate;
|
||||
public class TestDefaultConfiguration {
|
||||
// NOTE: unfortunately an abastract base class that contains all these mock functions won't work
|
||||
|
||||
@Bean
|
||||
public FromJsonHelper fromJsonHelper() {
|
||||
return mock(FromJsonHelper.class);
|
||||
}
|
||||
|
||||
@Bean
|
||||
public RoutingDataSourceServiceFactory routingDataSourceServiceFactory() {
|
||||
return mock(RoutingDataSourceServiceFactory.class);
|
||||
@@ -82,9 +75,4 @@ public class TestDefaultConfiguration {
|
||||
public LoanTransactionRepository loanTransactionRepository() {
|
||||
return mock(LoanTransactionRepository.class);
|
||||
}
|
||||
|
||||
@Bean
|
||||
public NoteCommandFromApiJsonDeserializer fromApiJsonDeserializer(FromJsonHelper fromJsonHelper) {
|
||||
return new NoteCommandFromApiJsonDeserializer(fromJsonHelper);
|
||||
}
|
||||
}
|
||||
|
||||
-12
@@ -20,7 +20,6 @@ package com.acme.fineract.portfolio.note.starter;
|
||||
|
||||
import static org.mockito.Mockito.mock;
|
||||
|
||||
import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper;
|
||||
import org.apache.fineract.infrastructure.core.service.database.RoutingDataSource;
|
||||
import org.apache.fineract.infrastructure.core.service.database.RoutingDataSourceServiceFactory;
|
||||
import org.apache.fineract.portfolio.client.domain.ClientRepositoryWrapper;
|
||||
@@ -28,7 +27,6 @@ import org.apache.fineract.portfolio.group.domain.GroupRepository;
|
||||
import org.apache.fineract.portfolio.loanaccount.domain.LoanRepositoryWrapper;
|
||||
import org.apache.fineract.portfolio.loanaccount.domain.LoanTransactionRepository;
|
||||
import org.apache.fineract.portfolio.note.domain.NoteRepository;
|
||||
import org.apache.fineract.portfolio.note.serialization.NoteCommandFromApiJsonDeserializer;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
@@ -37,11 +35,6 @@ import org.springframework.jdbc.core.JdbcTemplate;
|
||||
public class TestOverrideConfiguration {
|
||||
// NOTE: unfortunately an abastract base class that contains all these mock functions won't work
|
||||
|
||||
@Bean
|
||||
public FromJsonHelper fromJsonHelper() {
|
||||
return mock(FromJsonHelper.class);
|
||||
}
|
||||
|
||||
@Bean
|
||||
public RoutingDataSourceServiceFactory routingDataSourceServiceFactory() {
|
||||
return mock(RoutingDataSourceServiceFactory.class);
|
||||
@@ -81,9 +74,4 @@ public class TestOverrideConfiguration {
|
||||
public LoanTransactionRepository loanTransactionRepository() {
|
||||
return mock(LoanTransactionRepository.class);
|
||||
}
|
||||
|
||||
@Bean
|
||||
public NoteCommandFromApiJsonDeserializer fromApiJsonDeserializer(FromJsonHelper fromJsonHelper) {
|
||||
return new NoteCommandFromApiJsonDeserializer(fromJsonHelper);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user