Toggle navigation
Toggle navigation
This project
Loading...
Sign in
grogv3
/
grog-cubi
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
JR Utily
2017-02-07 00:09:07 +0100
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
55b911f2ad792f0447eb8fa2392978256483b021
55b911f2
1 parent
38d0c546
fix display names
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
src/test/java/org/legrog/entities/PublisherSearchRepositorySolrjTest.java
src/test/java/org/legrog/entities/PublisherSearchRepositorySolrjTest.java
View file @
55b911f
...
...
@@ -37,14 +37,14 @@ public class PublisherSearchRepositorySolrjTest {
class
saveTests
{
@Test
@DisplayName
(
"when called should addBean IndexedPublisher with commitWithinMs of 1 to repository"
)
@DisplayName
(
"when called
with right parameters,
should addBean IndexedPublisher with commitWithinMs of 1 to repository"
)
public
void
addBeanTest
(
@Mock
IndexedPublisher
indexedPublisher
)
throws
IndexingException
,
SolrServerException
,
IOException
{
publisherSearchRepository
.
save
(
indexedPublisher
);
verify
(
solrClient
).
addBean
(
indexedPublisher
,
1
);
}
@Test
@DisplayName
(
"When
call gets an IOException, should throw an IndexingException cobtaining it
"
)
@DisplayName
(
"When
repository in error, should throw an IndexingException
"
)
public
void
addBeanIOETest
(
@Mock
IndexedPublisher
indexedPublisher
)
throws
SolrServerException
,
IOException
{
when
(
solrClient
.
addBean
(
indexedPublisher
,
1
)).
thenThrow
(
new
IOException
());
Assertions
.
assertThrows
(
IndexingException
.
class
,
()
->
publisherSearchRepository
.
save
(
indexedPublisher
));
...
...
Please
register
or
login
to post a comment