[FEATURE] add ability to mock server responses #1

Open
opened 2023-03-14 23:01:52 +03:00 by vtolstov · 0 comments
Owner
  • NewServer returns server.Server and mock.ServerMock

  • ServerMock have methods:

    • ExpectRequest(server.Request) *ExpectedRequest
    • mock.ExpectationsWereMet() error
  • ExpectedRequest have methods:

    • WillDelayFor(time.Duration) - delay for amount of time before return result
    • WillReturnError(error) - return error for client Call
    • WillReturnResponse(interface{}) - return response
* NewServer returns server.Server and mock.ServerMock * ServerMock have methods: - ExpectRequest(server.Request) *ExpectedRequest - mock.ExpectationsWereMet() error * ExpectedRequest have methods: - WillDelayFor(time.Duration) - delay for amount of time before return result - WillReturnError(error) - return error for client Call - WillReturnResponse(interface{}) - return response
vtolstov added the
Kind/Feature
label 2023-04-02 03:01:34 +03:00
kgorbunov was assigned by vtolstov 2024-02-25 16:16:55 +03:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: unistack-org/micro-server-mock#1
No description provided.