Skip to content

Created Spring ToDo basic version#30

Open
vladimirchavkin wants to merge 11 commits into
EffectiveMobile:mainfrom
vladimirchavkin:dev
Open

Created Spring ToDo basic version#30
vladimirchavkin wants to merge 11 commits into
EffectiveMobile:mainfrom
vladimirchavkin:dev

Conversation

@vladimirchavkin

Copy link
Copy Markdown

No description provided.

import org.springframework.http.ResponseEntity;

@Tag(name = "Task Controller", description = "Контроллер для работы с задачами.")
public interface SwaggerTaskController {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Его не имплементирует контроллер

@@ -0,0 +1,22 @@
CREATE TABLE tasks
(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Предусловия напиши preconditions существует ли база

}

@Test
void createTask_Success_ReturnsCreatedTask() throws Exception {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Условия ТЗ в README не выполнены
Тестирование:
Покрыть приложение юнит и интеграционными тестами.
Интеграционные тесты для всех контроллеров через JSON Assert.
Настроить тестовую БД через Testcontainers.
Применять @SQL для подготовки данных.
Все тесты снабдить @DisplayName для читаемости логов.

fix:
- TaskController now implements SwaggerTaskController;

refactor:
- ApiResponse renamed to CustomResponse to avoid conflict with swagger.ApiResponse in SwaggerTaskController;
- V1__CREATE_TASKS_TABLE.sql now creates table IF NOT EXISTS;
- Tests now documented by @DisplayName annotation;

test:
- Added TaskControllerIntegrationTest;
features:
- Added TaskRepositoryValidator;

fix:
- ExceptionMessage now it has correct messages.

refactor:
- TaskRepositoryImpl -> JdbcTaskRepository;
- Task now Entity.
- TaskServiceImpl and TaskServiceImplTest now use HibernateTaskRepository instead JdbcTaskRepository;

test:
- Added HibernateTaskRepositoryTest;
features:
- Added JpaTaskRepository;

refactor:
TaskServiceImpl now use JpaTaskRepository;

test:
- Added JpaTaskRepositoryTest;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants