Code Monkey home page Code Monkey logo

article-unit-test's Introduction

개요

  • 테스트 기반 간단 게시판 CRUD 구현 프로젝트
  • 헥사고날 아키텍처 적용
  • 단위 테스트, 레이어 테스트, 통합 테스트

1. 패키지 구조

article
    ├── domain
    │    ├── Article.java  
    ├── application
    │    ├── service
    │    │   └── ArticleService.java
    │    └── port
    │        ├── in
    │        │   ├── CreateArticleUseCase.java
    │        │   ├── UpdateArticleUseCase.java
    │        │   ├── DeleteArticleUseCase.java
    │        │   └── QueryArticleUseCase.java
    │        └── out
    │            ├── CommandArticlePort.java
    │            ├── QueryArticlePort.java
    └── adaptor/port
             ├── in
             │    └── ArticleController.java
             └── out
                 └── repository
                       ├── ArticlePersistenceAdapter.java
                       ├── ArticleRepository.java
                       ├── entity
                             ├── ArticleEntity.java
                            

application/port/in패키지

  • 서비스가 구현해야 하는 interface
  • 인커밍 어답터 (ex. Controller)가 의존하는 인커밍 포트 인터페이스 존재

applcation/port/out패키지

  • 서비스가 의존하는 interface
  • 아웃고잉 어답터 (ex. Repository)에서 구현해야 하는 interface

apdaptor/port/in패키지

  • 인커밍 포트를 의존/호출하는 인커밍 어답터 존재 (ex. Controller)
  • 외부 API 요청을 받아 처리하는 Controller 위치

apdaptor/port/out패키지

  • 아웃고잉 포트에 대한 구현 어답터 존재 (ex. Repository)
  • JPA 관련 영속성 처리하는 Entity, JpaRepository 위치

2. 참고 사이트

article-unit-test's People

Contributors

ljw1126 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.