use of org.drools.verifier.api.reporting.IllegalVerifierStateIssue in project kie-wb-common by kiegroup.
the class Receiver method shutdown.
public void shutdown() {
if (worker != null) {
worker.terminate();
}
final HashSet<Issue> issues = new HashSet<>();
issues.add(new IllegalVerifierStateIssue());
reporter.sendReport(issues);
}
use of org.drools.verifier.api.reporting.IllegalVerifierStateIssue in project kie-wb-common by kiegroup.
the class IssuePresenterTest method testIllegalVerifierState.
@Test
public void testIllegalVerifierState() {
final Issue issue = new IllegalVerifierStateIssue();
screen.show(issue);
verify(view).setIssueTitle("VerifierFailedTitle");
ArgumentCaptor<SafeHtml> safeHtmlArgumentCaptor = ArgumentCaptor.forClass(SafeHtml.class);
verify(view).setExplanation(safeHtmlArgumentCaptor.capture());
assertEquals("<p>VerifierFailed</p>", safeHtmlArgumentCaptor.getValue().asString());
verify(view).setLines("");
}
use of org.drools.verifier.api.reporting.IllegalVerifierStateIssue in project kie-wb-common by kiegroup.
the class ReceiverTest method webWorkerException.
@Test
public void webWorkerException() {
returnObject = new WebWorkerException("error");
messageHandlerArgumentCaptor.getValue().onMessage(mock(MessageEvent.class));
verify(reporter, never()).sendStatus(any());
verify(reporter).sendReport(setArgumentCaptor.capture());
verify(worker).terminate();
final Set<Issue> issues = setArgumentCaptor.getValue();
assertEquals(1, issues.size());
assertTrue(issues.iterator().next() instanceof IllegalVerifierStateIssue);
}
Aggregations