Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yevheniyJ committed Oct 18, 2024
1 parent 32a7302 commit 4779ba5
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ public void testBundleAdd(String name, String format, List<String> source, List<
request.setLabelIds(labels);
request.setIgnorePatterns(ignore);
request.setSourcePatterns(source);
request.setIncludeProjectSourceLanguage(false);
request.setIsMultilingual(false);

ClientBundle client = mock(ClientBundle.class);
when(client.addBundle(request))
Expand All @@ -55,7 +57,7 @@ public void testBundleAdd(String name, String format, List<String> source, List<
setIgnorePatterns(request.getIgnorePatterns());
setSourcePatterns(request.getSourcePatterns());
}});
action = new BundleAddAction(name, format, source, ignore, translation, labels, false);
action = new BundleAddAction(name, format, source, ignore, translation, labels, false, false, false);
action.act(Outputter.getDefault(), pb, client);
verify(client).addBundle(request);
verifyNoMoreInteractions(client);
Expand All @@ -82,11 +84,13 @@ public void testAddBundleThrows() {
request.setLabelIds(null);
request.setIgnorePatterns(null);
request.setSourcePatterns(null);
request.setIsMultilingual(false);
request.setIncludeProjectSourceLanguage(false);

when(client.addBundle(request))
.thenThrow(new RuntimeException("Whoops"));

action = new BundleAddAction("", "", null, null, null, null, false);
action = new BundleAddAction("", "", null, null, null, null, false, false, false);
assertThrows(RuntimeException.class, () -> action.act(Outputter.getDefault(), pb, client));

verify(client).addBundle(request);
Expand Down

0 comments on commit 4779ba5

Please sign in to comment.