Open victornoel opened 5 years ago
@g4s8 or maybe a test for the command notifications
is better, I don't know if the user can enter text with a callback query...
@g4s8 can we get feedback on this?
For example, should/could we:
Mockito
like this: https://github.com/g4s8/ghman/blob/master/src/test/java/com/g4s8/ghman/bot/TkCloseIssueTest.javaI don't really like the Mockito solution instead of using fake, so maybe we should introduce some ghman-oriented fakes for update instead?
Furthermore, I think we need something higher-level, a bit like takes' testing abstractions (see https://github.com/yegor256/takes#unit-testing).
@g4s8 for the record, I went with fake Update
object in #68 as an example.
@victornoel we can only use reflection/mockito for testing update, but it should be fixed with https://github.com/g4s8/teletakes/issues/10
@g4s8 as I said in my previous https://github.com/g4s8/ghman/issues/12#issuecomment-511205841, we are not forced to only use reflection or mockito. I explained it a bit in https://github.com/g4s8/teletakes/issues/10#issuecomment-512448568
In order to start working on #10, I need to be able to write a test but I have no idea how I can do that with teletakes.
I think the project should have a few tests for the existing code so that I can use it as an example.
A perfect one would be for
click:notification
inBotApp
.