пытаясь unit test, я установил правильный UIBarButtonSystemItem на своих навигационных кнопках.
Я могу вернуть стиль, но не могу найти способ получить UIBarButtonSystemItem
перечисления, которые были установлены для кнопок. Это не так, потому что стиль отличается от перечисления, чем
UIBarButtonSystemItem:
- (void)test_init_should_set_left_right_barButtonItems {
    UIBarButtonItem *left = mainVCSUT.navigationItem.leftBarButtonItem;
    UIBarButtonItem *right = mainVCSUT.navigationItem.rightBarButtonItem;
    [Assert isNotNil:left];
    [Assert isNotNil:right];
    UIBarButtonItemStyle leftStyle = left.style;
    UIBarButtonItemStyle rightStyle = right.style;
    [Assert that:[The int:leftStyle] is:[Equal to:[The int:UIBarButtonSystemItemRefresh]]];
    [Assert that:[The int:rightStyle] is:[Equal to:[The int:UIBarButtonSystemItemSearch]]];
}
