Skip to content

Commit 4f2d8e8

Browse files
authored
Merge pull request #473 from Flowdalic/coveralls
[ci] Re-enable coveralls
2 parents 8d74873 + b52e027 commit 4f2d8e8

File tree

2 files changed

+38
-2
lines changed

2 files changed

+38
-2
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ jobs:
1515
java:
1616
- 11
1717
- 15
18+
env:
19+
PRIMARY_JAVA_VERSION: 11
1820

1921
steps:
2022
- name: Checkout
@@ -78,12 +80,12 @@ jobs:
7880

7981
# Javadoc
8082
- name: Javadoc
81-
if: ${{ matrix.java == 11 }}
83+
if: ${{ matrix.java == env.PRIMARY_JAVA_VERSION }}
8284
run: ${PATH_TO_GRADLE} javadocAll --stacktrace
8385

8486
# Test Coverage Report
8587
- name: Jacoco Test Coverage
86-
if: ${{ matrix.java == 1.8 }}
88+
if: ${{ matrix.java == env.PRIMARY_JAVA_VERSION }}
8789
run: ${PATH_TO_GRADLE} jacocoRootReport coveralls
8890
env:
8991
COVERALLS_REPO_TOKEN: S2ecSJja2cKJa9yv45C8ZFPohXuRrTXKd
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/**
2+
*
3+
* Copyright 2021 Florian Schmaus
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
package org.jivesoftware.smack.websocket.java11;
18+
19+
import static org.junit.jupiter.api.Assertions.assertNotNull;
20+
import static org.mockito.Mockito.mock;
21+
22+
import org.jivesoftware.smack.c2s.internal.ModularXmppClientToServerConnectionInternal;
23+
import org.jivesoftware.smack.websocket.rce.WebSocketRemoteConnectionEndpoint;
24+
25+
public class Java11WebSocketFactoryTest {
26+
27+
public void returnsNotNullTest() {
28+
WebSocketRemoteConnectionEndpoint endpoint = mock(WebSocketRemoteConnectionEndpoint.class);
29+
ModularXmppClientToServerConnectionInternal connectionInternal = mock(ModularXmppClientToServerConnectionInternal.class);
30+
31+
Java11WebSocket java11WebSocket = Java11WebSocketFactory.INSTANCE.create(endpoint, connectionInternal);
32+
assertNotNull(java11WebSocket);
33+
}
34+
}

0 commit comments

Comments
 (0)