Testing Hypotheses for Equivalence and Non-inferiority with Binary and Survival Outcomes