hpi-swa-teaching / IMAPClient

This project provides a library and tool set to access email through IMAP in the Squeak/Smalltalk environment. (SWT22-13)
MIT License
22 stars 3 forks source link

Increase test coverage #412

Closed laugengebaeck closed 3 years ago

laugengebaeck commented 3 years ago

What does this change?

This adds missing tests for classes with poor test coverage. Currently finished are:

Co-authored-by: Smilla Fox foxsmilla@gmail.com Co-authored-by: Lukas Rost lukas.rost@student.hpi.de

Checklist

coveralls commented 3 years ago

Pull Request Test Coverage Report for Build 987031768


Totals Coverage Status
Change from base Build 949369331: 6.1%
Covered Lines: 1124
Relevant Lines: 1435

💛 - Coveralls
laugengebaeck commented 3 years ago

I found a really weird code duplication in ICFolder>>retrieveBodyFor: and ICEmail>>retrieveBody. Which one is the "right" one and which one shoud be tested?

Does someone know more about this (@jannikgro or @elenagensch maybe)?

Edit: Jan said the ICFolder one was the right one and the other is dead code (now removed)

laugengebaeck commented 3 years ago

Most of the remaining untested methods in ICConnectionHandler, ICEndpoint and ICFolder cover server interaction. We already have an ICMockServer which we could use for that, but it seems complicated to implement. As our focus isn't TDD, we should probably stop here. What do you think?

sm1lla commented 3 years ago

I agree. These aren't methods we implemented ourself and it would take too much time to understand ICMockServer as we haven't worked intensively with the IMAP protocol yet. Let's leave the remaining methods untested for now and come back to them if we have more time in another sprint.

laugengebaeck commented 3 years ago

Would also merge this today (maybe somebody wants to do a quick review again :)