Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

新增 Dummy Logger for Testing #193

Open
wants to merge 6 commits into
base: development
Choose a base branch
from

Conversation

SivWatt
Copy link
Contributor

@SivWatt SivWatt commented Apr 24, 2021

👏 解決掉的 issue / Resolved Issues

📝 相關的 issue / Related Issues

⛏ 變更內容 / Details of Changes

  • logging
    • 新增 DummyLogger 結構,method 皆為空函式
  • main
    • 修改 NewRepository NewUsecase NewHTTPDelivery 傳入變數 logger 作為相依 (Dependency)
  • http
    • 修改測試函式皆使用 DummyLogger 為相依
  • repository
    • 修改測試函式皆使用 DummyLogger 為相依
  • usecase
    • 修改測試函式皆使用 DummyLogger 為相依

注意:此PR目的是演示一下 mock logger 的概念

@codecov-commenter
Copy link

codecov-commenter commented Apr 24, 2021

Codecov Report

Merging #193 (5b854be) into development (0dc9641) will increase coverage by 0.37%.
The diff coverage is 13.33%.

Impacted file tree graph

@@               Coverage Diff               @@
##           development     #193      +/-   ##
===============================================
+ Coverage        45.20%   45.58%   +0.37%     
===============================================
  Files               25       26       +1     
  Lines             1294     1303       +9     
===============================================
+ Hits               585      594       +9     
  Misses             623      623              
  Partials            86       86              
Impacted Files Coverage Δ
internal/logging/logger.go 100.00% <ø> (+100.00%) ⬆️
internal/logging/mock_logger.go 0.00% <0.00%> (ø)
internal/repository/repository.go 0.00% <0.00%> (ø)
main.go 0.00% <0.00%> (ø)
internal/delivery/http/http.go 50.00% <100.00%> (ø)
internal/usecase/usecase.go 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0dc9641...5b854be. Read the comment docs.

@karta0807913 karta0807913 mentioned this pull request Aug 21, 2021
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.

None yet

2 participants