@rudolf.hladik because these are completely different: asserts are used during testing to ensure some constraints are met, a form of sanity check of sorts. second one simply does
nothing if tv is null, which may lead to incorrect behavior down the line. Third option is to use function, such as kotlin's
require
, to ensure some condition outside of test environment, to make sure everything works and is called properly.