Fix `<dispatcher>` substitution for events: `dogma.EventRecorder` no longer exists

Đang mở Phù hợp với người mới
#464 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
84/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
go
Lĩnh vực
testing

Hướng nghiên cứu

Bắt đầu trong internal/inflect/inflect.go và kiểm tra việc thay thế sự kiện cho placeholder . Cập nhật đầu ra mong đợi trong expectation.message.eventcall_test.go và expectation.messagetype.eventcall_test.go, sau đó sửa các tham chiếu đến dogma.EventRecorder trong các chú thích tài liệu của action.call.go. Chạy các kiểm thử bị ảnh hưởng và xác nhận rằng không còn tên interface cũ nào.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

In internal/inflect/inflect.go, the <dispatcher> placeholder for message.EventKind is substituted with dogma.EventRecorder:

message.EventKind: {
    // ...
    "<dispatcher>": "dogma.EventRecorder",
},

dogma.EventRecorder was removed in a prior release (see CHANGELOG). This means error messages and suggestions that use <dispatcher> in an event context — such as the hint in expectation.messagecommon.go:

s.AppendListItem(inflect.Sprint(t.kind, "verify the logic within the code that uses the <dispatcher>"))

…will render stale/incorrect interface names to the user.

The substitution should be updated to reflect the current Dogma API. The test files expectation.message.eventcall_test.go and expectation.messagetype.eventcall_test.go also hardcode dogma.EventRecorder in expected output and will need updating.

Also, action.call.go references dogma.EventRecorder in a doc comment (lines 13 and 21) and should be corrected.

Ngôn ngữ chính
Go
Star
1
Fork
1
Merge trung bình
18 phút
Pull request đã merge (30 ngày)
7

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của dogmatiq/testkit

Tất cả issue của dogmatiq/testkit

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.