mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +00:00
adjust tests phase2 to support access_status filter
This commit is contained in:
@@ -1235,6 +1235,7 @@ public class DiscoveryRestControllerIT extends AbstractControllerIntegrationTest
|
|||||||
SearchFilterMatcher.hasFileNameInOriginalBundleFilter(),
|
SearchFilterMatcher.hasFileNameInOriginalBundleFilter(),
|
||||||
SearchFilterMatcher.hasFileDescriptionInOriginalBundleFilter(),
|
SearchFilterMatcher.hasFileDescriptionInOriginalBundleFilter(),
|
||||||
SearchFilterMatcher.entityTypeFilter(),
|
SearchFilterMatcher.entityTypeFilter(),
|
||||||
|
SearchFilterMatcher.accessStatusFilter(),
|
||||||
SearchFilterMatcher.isAuthorOfPublicationRelation(),
|
SearchFilterMatcher.isAuthorOfPublicationRelation(),
|
||||||
SearchFilterMatcher.isProjectOfPublicationRelation(),
|
SearchFilterMatcher.isProjectOfPublicationRelation(),
|
||||||
SearchFilterMatcher.isOrgUnitOfPublicationRelation(),
|
SearchFilterMatcher.isOrgUnitOfPublicationRelation(),
|
||||||
|
@@ -506,7 +506,8 @@ public class DiscoveryScopeBasedRestControllerIT extends AbstractControllerInteg
|
|||||||
FacetEntryMatcher.subjectFacet(false),
|
FacetEntryMatcher.subjectFacet(false),
|
||||||
FacetEntryMatcher.dateIssuedFacet(false),
|
FacetEntryMatcher.dateIssuedFacet(false),
|
||||||
FacetEntryMatcher.hasContentInOriginalBundleFacet(false),
|
FacetEntryMatcher.hasContentInOriginalBundleFacet(false),
|
||||||
FacetEntryMatcher.entityTypeFacet(false)
|
FacetEntryMatcher.entityTypeFacet(false),
|
||||||
|
FacetEntryMatcher.accessStatusFacet(false)
|
||||||
))
|
))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -618,7 +619,8 @@ public class DiscoveryScopeBasedRestControllerIT extends AbstractControllerInteg
|
|||||||
FacetEntryMatcher.subjectFacet(false),
|
FacetEntryMatcher.subjectFacet(false),
|
||||||
FacetEntryMatcher.dateIssuedFacet(false),
|
FacetEntryMatcher.dateIssuedFacet(false),
|
||||||
FacetEntryMatcher.hasContentInOriginalBundleFacet(false),
|
FacetEntryMatcher.hasContentInOriginalBundleFacet(false),
|
||||||
FacetEntryMatcher.entityTypeFacet(false)
|
FacetEntryMatcher.entityTypeFacet(false),
|
||||||
|
FacetEntryMatcher.accessStatusFacet(false)
|
||||||
))
|
))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -668,7 +670,8 @@ public class DiscoveryScopeBasedRestControllerIT extends AbstractControllerInteg
|
|||||||
FacetEntryMatcher.subjectFacet(false),
|
FacetEntryMatcher.subjectFacet(false),
|
||||||
FacetEntryMatcher.dateIssuedFacet(false),
|
FacetEntryMatcher.dateIssuedFacet(false),
|
||||||
FacetEntryMatcher.hasContentInOriginalBundleFacet(false),
|
FacetEntryMatcher.hasContentInOriginalBundleFacet(false),
|
||||||
FacetEntryMatcher.entityTypeFacet(false)
|
FacetEntryMatcher.entityTypeFacet(false),
|
||||||
|
FacetEntryMatcher.accessStatusFacet(false)
|
||||||
))
|
))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@@ -111,6 +111,17 @@ public class SearchFilterMatcher {
|
|||||||
checkOperators()
|
checkOperators()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Matcher<? super Object> accessStatusFilter() {
|
||||||
|
return allOf(
|
||||||
|
hasJsonPath("$.filter", is("access-status")),
|
||||||
|
hasJsonPath("$.hasFacets", is(true)),
|
||||||
|
hasJsonPath("$.type", is("text")),
|
||||||
|
hasJsonPath("$.openByDefault", is(false)),
|
||||||
|
checkOperators()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
public static Matcher<? super Object> isAuthorOfPublicationRelation() {
|
public static Matcher<? super Object> isAuthorOfPublicationRelation() {
|
||||||
return allOf(
|
return allOf(
|
||||||
hasJsonPath("$.filter", is("isAuthorOfPublication")),
|
hasJsonPath("$.filter", is("isAuthorOfPublication")),
|
||||||
|
Reference in New Issue
Block a user