public void WrongCoupleWomanTest() { try { God god = new God(); Girl girl = new Girl(NamesHelper.GenerateName(Sex.Woman)); SmartGirl smartGirl = new SmartGirl(NamesHelper.GenerateName(Sex.Woman)); god.MakeCouple(girl, smartGirl); Assert.Fail("No exception"); } catch (Exception ex) { if (!(ex is WrongCoupleException)) { Assert.Fail("Not WrongCoupleException"); } } }
public void WrongCoupleManTest() { try { God god = new God(); Student student = new Student(NamesHelper.GenerateName(Sex.Man)); Botan botan = new Botan(NamesHelper.GenerateName(Sex.Man)); god.MakeCouple(student, botan); Assert.Fail("No exception"); } catch (Exception ex) { if (!(ex is WrongCoupleException)) { Assert.Fail("Not WrongCoupleException"); } } }