public void Test4Method1() { string email = "test@test_ru"; Lab6num4 num4 = new Lab6num4(); Assert.ThrowsException <ArgumentException>(() => num4.Num4(email), "не обработан почтовый ящик."); }
public void Test4Method2() { string email = "*****@*****.**"; bool expected = true; Lab6num4 num4 = new Lab6num4(); bool resultRegex = num4.Num4(email); Assert.AreEqual(expected, resultRegex); }