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

Question - How can I mock 'gortsplib.ServerSession' (using v2.0.0) #602

Open
lisberPontes opened this issue Aug 9, 2024 Discussed in #436 · 0 comments
Open

Question - How can I mock 'gortsplib.ServerSession' (using v2.0.0) #602

lisberPontes opened this issue Aug 9, 2024 Discussed in #436 · 0 comments

Comments

@lisberPontes
Copy link

I'm currently adding unit tests and I'm now facing the problem in which I need to mock:
'gortsplib.ServerSession'

I've tried to create my own 'wrapper'/interface.

However, not all methods can be defined (since some types are not exported).

Example:
SetuppedMedias() media.Medias

How, can we mock this struct ?
Could you consider adding an interface around it ?

Thanks in advance.

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

No branches or pull requests

1 participant