Skip to content

How to mock SelectObjectContent async call. #3453

Discussion options

You must be logged in to vote

Found the solution. Mock the interface "ISelectObjectContentEventStream" with a constructor to pass IS3Event.

internal class MockSelectObjectContentEventStream : ISelectObjectContentEventStream
{
    private readonly List<IS3Event> s3Events;
    public int BufferSize { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }

    public event EventHandler<EventStreamEventReceivedArgs<IS3Event>> EventReceived;
    public event EventHandler<EventStreamExceptionReceivedArgs<S3EventStreamException>> ExceptionReceived;
    public event EventHandler<EventStreamEventReceivedArgs<RecordsEvent>> RecordsEventReceived;
    public event EventHandler<EventStreamEventRe…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by bhoradc
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant