This is the codeAbility Sharing Platform! Learn more about the
codeAbility Sharing Platform
.
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
codeAbility Sharing Platform
Manage
Activity
Members
Labels
Plan
Issues
43
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
development
sharing
codeAbility Sharing Platform
Commits
d9e54f04
Commit
d9e54f04
authored
3 years ago
by
Johannes Kainz
Browse files
Options
Downloads
Patches
Plain Diff
added a test case for the new method in search service
parent
6fee1bb6
2 merge requests
!188
Merging Peer Reviewing et. al to Master
,
!164
211 peer reviewing functionality
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/test/java/at/ac/uibk/gitsearch/service/SearchServiceIT.java
+13
-0
13 additions, 0 deletions
...st/java/at/ac/uibk/gitsearch/service/SearchServiceIT.java
with
13 additions
and
0 deletions
src/test/java/at/ac/uibk/gitsearch/service/SearchServiceIT.java
+
13
−
0
View file @
d9e54f04
...
...
@@ -43,6 +43,7 @@ import org.slf4j.LoggerFactory;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.test.context.SpringBootTest
;
import
org.springframework.boot.test.mock.mockito.MockBean
;
import
org.springframework.security.test.context.support.WithAnonymousUser
;
import
org.springframework.security.test.context.support.WithMockUser
;
import
at.ac.uibk.gitsearch.GitsearchApp
;
...
...
@@ -307,4 +308,16 @@ public class SearchServiceIT {
Assertions
.
assertFalse
(
result
.
get
().
getSupportedActions
().
stream
().
anyMatch
(
action
->
action
.
getPlugin
().
equals
(
"Artemis Sharing Connector"
)));
}
@Test
@WithAnonymousUser
public
void
testSearchAll
()
throws
IOException
{
SearchResultsDTO
searchResults
=
searchService
.
searchAll
();
Assert
.
assertTrue
(
"At least one hit?"
,
searchResults
.
getSearchResult
().
size
()
>=
1
);
Assert
.
assertEquals
(
"We start at 0"
,
0
,
searchResults
.
getPageStartIndex
());
LOGGER
.
info
(
"found {} hits for search all"
,
searchResults
.
getHitCount
());
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment