private void AddCaseForFiltersExcept([NotNull] TestCasesBuilder builder) { NotifyFilters union = GetUnionForFilters(); NotifyFilters except = ~union & TestNotifyFilters.All; builder.Add(except, ""); }
private void AddCasesForSingleFilter([NotNull] TestCasesBuilder builder) { int bitmask = 1; NotifyFilters filters = GetUnionForFilters(); while (filters != 0) { var currentFilter = (NotifyFilters)bitmask; if (filters.HasFlag(currentFilter)) { builder.Add(currentFilter, GetExpectedTextForFilters(currentFilter)); filters &= ~currentFilter; } bitmask = bitmask << 1; } }
private void AddCaseForAllFilters([NotNull] TestCasesBuilder builder) { string expectedText = GetExpectedTextForFilters(TestNotifyFilters.All); builder.Add(TestNotifyFilters.All, expectedText); }