fontelemos / cem

Concurrent Editing Manager - simple, fast and safe
MIT License
1 stars 0 forks source link

Add mocked TcpStream tests #7

Closed fontelemos closed 3 years ago

fontelemos commented 3 years ago

suggestion: https://github.com/lipanski/mockito

theses tests can replace the old threading_test.rs

fontelemos commented 3 years ago

These mocks won't work because the Tokio's TcpStream have different traits. For now we can refactor some code out of handle_connection to test them one by one (without the stream if possible) and start thinking about some integration tests. I'm gonna close this issue and open a integration test one