public void TestAgregarLista() { bool algo; Competencia <MotoCross> competencia = new Competencia <MotoCross>(3, 5, Competencia <MotoCross> .TipoCompetencia.MotoCross); MotoCross moto = new MotoCross(15, "Ferrari"); algo = competencia + moto; Assert.IsTrue(competencia == moto); }
public void TestNoException() { bool algo; Competencia <MotoCross> competencia = new Competencia <MotoCross>(3, 5, Competencia <MotoCross> .TipoCompetencia.MotoCross); MotoCross moto = new MotoCross(15, "Ferrari"); try { algo = competencia + moto; } catch (Exception e) { Assert.Fail("No deberia producirse excepcion"); } }