This is an automated email from the ASF dual-hosted git repository. solomax pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/openmeetings.git
The following commit(s) were added to refs/heads/master by this push: new 17786e1 [OPENMEETINGS-2493] tests should be fixed 17786e1 is described below commit 17786e12159a5021153e6ee69d8bdf9cc8a1c3a3 Author: Maxim Solodovnik <solomax...@gmail.com> AuthorDate: Sat Oct 24 13:24:11 2020 +0700 [OPENMEETINGS-2493] tests should be fixed --- .../test/java/org/apache/openmeetings/core/remote/BaseMockedTest.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/openmeetings-core/src/test/java/org/apache/openmeetings/core/remote/BaseMockedTest.java b/openmeetings-core/src/test/java/org/apache/openmeetings/core/remote/BaseMockedTest.java index 154c6a7..7402754 100644 --- a/openmeetings-core/src/test/java/org/apache/openmeetings/core/remote/BaseMockedTest.java +++ b/openmeetings-core/src/test/java/org/apache/openmeetings/core/remote/BaseMockedTest.java @@ -27,10 +27,12 @@ import static org.mockito.Mockito.mockStatic; import java.util.Locale; +import org.apache.openmeetings.IApplication; import org.apache.openmeetings.core.util.WebSocketHelper; import org.apache.openmeetings.db.dao.label.LabelDao; import org.apache.openmeetings.db.entity.basic.IWsClient; import org.apache.openmeetings.db.entity.label.OmLanguage; +import org.apache.openmeetings.db.util.ApplicationHelper; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.extension.ExtendWith; import org.kurento.client.KurentoClient; @@ -83,6 +85,7 @@ public class BaseMockedTest { try (MockedStatic<AbstractStream> streamMock = mockStatic(AbstractStream.class); MockedStatic<WebSocketHelper> wsHelperMock = mockStatic(WebSocketHelper.class); MockedStatic<LabelDao> labelMock = mockStatic(LabelDao.class); + MockedStatic<ApplicationHelper> appHelpMock = mockStatic(ApplicationHelper.class); ) { wsHelperMock.when(() -> WebSocketHelper.sendClient(any(IWsClient.class), any(JSONObject.class))).thenAnswer(new Answer<Void>() { @@ -96,6 +99,7 @@ public class BaseMockedTest { streamMock.when(() -> AbstractStream.createPlayerEndpoint(any(MediaPipeline.class), anyString())).thenReturn(mock(PlayerEndpoint.class)); labelMock.when(() -> LabelDao.getLanguage(any(Long.class))).thenReturn(new OmLanguage(Locale.ENGLISH)); + appHelpMock.when(() -> ApplicationHelper.ensureApplication(any(Long.class))).thenReturn(mock(IApplication.class)); task.run(); } }