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

Add tests for ClientHandler #42

Open
Vimbayinashe opened this issue Feb 2, 2022 · 3 comments · May be fixed by #62
Open

Add tests for ClientHandler #42

Vimbayinashe opened this issue Feb 2, 2022 · 3 comments · May be fixed by #62
Assignees

Comments

@Vimbayinashe
Copy link
Contributor

ClientHandler currently has a code coverage of 0% in the existing tests.

@Vimbayinashe Vimbayinashe self-assigned this Feb 2, 2022
@LordRekishi
Copy link
Contributor

It might be difficult to make functional tests for the ClientHandler and Server since their functionality is tied to connecting clients and sending questions and receiving responses through the network.

@Vimbayinashe
Copy link
Contributor Author

Yes, I agree 😅! Martin mentioned that it is possible to mock a socket byte stream as an argument for ClientHandler's constructor and test its run method when I was working on issue #11 so I want to give it a try.

@LordRekishi
Copy link
Contributor

Yes, I agree 😅! Martin mentioned that it is possible to mock a socket byte stream as an argument for ClientHandler's constructor and test its run method when I was working on issue #11 so I want to give it a try.

Go for it! You might also be able to use my Client stub class found in the test folder, together with what I did in @BeforeAll in my ServerTest

@Vimbayinashe Vimbayinashe linked a pull request Feb 3, 2022 that will close this issue
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 a pull request may close this issue.

2 participants