public void ClientGenderTests_VeryfyTestCaseAttributes() { var obj = new ClientGenderTests(); var result = obj.GetType() .GetMethods() .Select(x => x.GetCustomAttributes(false) .Where(z => z.GetType() == typeof(TestCaseAttribute)) .Count()) .Sum(); Assert.AreEqual(3, result); }
public void ClientGenderTests_VerifyNumberOfTests() { var methodsFromFramework = 4; var expectedMethods = 1; var totalExpectedMethods = methodsFromFramework + expectedMethods; var obj = new ClientGenderTests(); var result = obj.GetType() .GetMethods() .Count(); Assert.AreEqual(totalExpectedMethods, result); }