Like unit test if an event executes a session

How to unit test, if any event, for example, to touch this button, will cause a certain session? I know that I can directly call segue and check the result, but I want to check if the event will be executed by segue, in other words, if the link in the storyboard is perfect.

+4
source share
1 answer

I don’t know if it was your doubt, but you can check if it is correct segue

Try the following:

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { if ([[segue identifier] isEqualToString:@"YOUR_SEGUE_NAME_HERE"]) { } } 
+1
source

Source: https://habr.com/ru/post/1496015/


All Articles