
DI를 활용하여 test code를 작성하는 방법에 대하여 알아보자. DI + test code class Robot { private helloService; constructor() { this.helloService = new HelloService(); } public start() { return this.helloService.hello(); } } 위와 같이 Robot class 안에 HelloService를 new하면 Robot은 HelloService에 종속하게 된다. Robot class의 test code를 작성하기 위해서는 HelloService의 hello mothod의 호출을 생각해야한다. 이러한 종속성을 제거하기 위해 inversify와 같은 DI container를 사용하여 ..
develop
2020. 3. 3. 00:16
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- nginx
- Develop
- Python
- shorten
- Elasticsearch
- typescript
- Terraform
- Github Actions
- aws
- pagination
- mongoDB
- graphql
- inversify
- sementic version
- Lifecycle
- AWS community day seoul
- Cloudfront
- Neptune
- nltk
- JavaScript
- Prisma
- NLP
- Cognito
- slowquery
- conventional commit
- mognodb
- Clickjacking
- Airflow
- lambda@edge
- commit message
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
글 보관함