Skip to content

Commit

Permalink
Combine definition and declaration in ApiFilterStoreTests
Browse files Browse the repository at this point in the history
Minimal readability improvement found while looking into unstable test.
  • Loading branch information
akurtakov committed Apr 23, 2024
1 parent 98a5865 commit 65942e1
Showing 1 changed file with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2008, 2018 IBM Corporation and others.
* Copyright (c) 2008, 2024 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
Expand Down Expand Up @@ -183,8 +183,7 @@ public void testRemoveFilter() throws CoreException {
IApiProblem problem = ApiProblemFactory.newApiProblem(resource.getProjectRelativePath().toPortableString(),
null, null, null, null, -1, -1, -1, IApiProblem.CATEGORY_USAGE, 0, RestrictionModifiers.NO_IMPLEMENT,
IApiProblem.NO_FLAGS);
IApiFilterStore store;
store = component.getFilterStore();
IApiFilterStore store = component.getFilterStore();
store.removeFilters(new IApiProblemFilter[] {
ApiProblemFactory.newProblemFilter(component.getSymbolicName(), problem, null) });
assertFalse("src/x/y/z/C4.java should not have a filter", store.isFiltered(problem)); //$NON-NLS-1$
Expand All @@ -203,8 +202,7 @@ public void testAddFilterFromFilter() throws CoreException {
IApiProblem problem = ApiProblemFactory.newApiProblem(resource.getProjectRelativePath().toPortableString(),
null, null, null, null, -1, -1, -1, IApiProblem.CATEGORY_USAGE, 0, RestrictionModifiers.NO_IMPLEMENT,
IApiProblem.NO_FLAGS);
IApiFilterStore store;
store = component.getFilterStore();
IApiFilterStore store = component.getFilterStore();
store.addFilters(new IApiProblemFilter[] {
ApiProblemFactory.newProblemFilter(component.getSymbolicName(), problem, null) });
assertTrue("src/x/y/z/C4.java should have a filter", store.isFiltered(problem)); //$NON-NLS-1$
Expand All @@ -226,8 +224,7 @@ public void testAddFilterFromProblem() throws CoreException {
IApiProblem problem = ApiProblemFactory.newApiProblem(resource.getProjectRelativePath().toPortableString(),
null, null, null, null, -1, -1, -1, IApiProblem.CATEGORY_USAGE, 0, RestrictionModifiers.NO_IMPLEMENT,
IApiProblem.NO_FLAGS);
IApiFilterStore store;
store = component.getFilterStore();
IApiFilterStore store = component.getFilterStore();
store.addFiltersFor(new IApiProblem[] { problem });
assertTrue("src/x/y/z/C4.java should have a filter", store.isFiltered(problem)); //$NON-NLS-1$
store.removeFilters(new IApiProblemFilter[] {
Expand Down

0 comments on commit 65942e1

Please sign in to comment.