public static string?GetNamespace(this ITestCase testCase) { var testClassName = testCase.GetTestClass(); if (testClassName == null) { return(null); } int dot = testClassName.LastIndexOf('.'); return(dot <= 0 ? null : testClassName.Substring(0, dot)); }
private bool ApplyTypeNameFilter(ITestCase testCase, Func <bool, bool>?reportFilteredTest = null) { Func <bool, bool> log = (result) => reportFilteredTest?.Invoke(result) ?? result; var testClassName = testCase.GetTestClass(); if (!string.IsNullOrEmpty(testClassName)) { if (string.Equals(testClassName, SelectorValue, StringComparison.InvariantCulture)) { return(log(Exclude)); } } return(log(!Exclude)); }