Skip to content

Commit

Permalink
Update deprecated imports
Browse files Browse the repository at this point in the history
  • Loading branch information
mwodahl committed Jun 30, 2023
1 parent 30897f2 commit d8bda6a
Show file tree
Hide file tree
Showing 17 changed files with 56 additions and 58 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import java.net.UnknownHostException;
import java.util.Arrays;

import org.junit.Ignore;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

import mockit.Capturing;
Expand All @@ -44,7 +44,7 @@ public void testConstrcutor() throws UnknownHostException {
assertNull(pkt.getPayload());
}

@Test @Ignore
@Test @Disabled
public void test() throws UnknownHostException {
test("127.0.0.1", 12, "01234567890".getBytes());
test("::1", 47561, "0123456789001234567890".getBytes());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@
import java.util.Arrays;

import us.dot.its.jpo.ode.eventlog.EventLogger;
import org.junit.BeforeClass;
import org.junit.Ignore;

import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

import mockit.Capturing;
Expand Down Expand Up @@ -65,7 +66,7 @@ private enum TestCase {
TestForwardPacketInbound, TestSendPacketOutbound, TestIPv6ForwardOutbound, TestIPv4ForwardOutboundForward, TestIPv4ForwardOutboundSend, TestIPv6SendOutbound, TestIPv4SendOutbound,
};

@BeforeClass
@BeforeAll
public static void init() {
}

Expand All @@ -91,13 +92,13 @@ public void testForwardPacketInbound(String hostname)
checkBackgroundThreadAssertion();
}

@Test @Ignore
@Test @Disabled
public void testSendPacketOutboundIPv4() throws UnknownHostException, InterruptedException, InetPacketException {
// Use case: Forwarder sends outgoing IPv4 packet out
testSendPacketOutbound(CLIENT_HOST_IPV4);
}

@Test @Ignore
@Test @Disabled
public void testSendPacketOutboundIPv6() throws UnknownHostException, InterruptedException, InetPacketException {
// Use case: Forwarder sends outgoing IPv6 packet out
testSendPacketOutbound(CLIENT_HOST_IPV6);
Expand Down Expand Up @@ -150,7 +151,7 @@ public void testIPv4ForwardOutboundSend() throws InterruptedException, UnknownHo
checkBackgroundThreadAssertion();
}

@Test @Ignore
@Test @Disabled
public void testIPv6SendOutbound() throws InterruptedException, UnknownHostException, InetPacketException {
// Use case: Transport or Data Sink send IPv6 message out directly
startUdpListener(CLIENT_PORT, TestCase.TestIPv6SendOutbound);
Expand All @@ -160,7 +161,7 @@ public void testIPv6SendOutbound() throws InterruptedException, UnknownHostExcep
checkBackgroundThreadAssertion();
}

@Test @Ignore
@Test @Disabled
public void testIPv4SendOutbound() throws InterruptedException, UnknownHostException, InetPacketException {
// Use case: Transport or Data Sink send IPv4 message out directly
startUdpListener(CLIENT_PORT, TestCase.TestIPv4SendOutbound);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import java.net.InetAddress;
import java.net.UnknownHostException;

import org.junit.Before;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import mockit.Expectations;
Expand All @@ -40,7 +40,7 @@ public class InetPacketTest {

@Mocked InetAddress mockAddress;

@Before
@BeforeEach
public void setup() {
new MockUp<InetAddress>() {
@Mock InetAddress getByName(String host) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,22 @@
import java.nio.ByteBuffer;
import java.nio.ByteOrder;

import org.junit.After;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

public class CrcCccittTest {

@BeforeClass
@BeforeAll
public static void setUpBeforeClass() throws Exception {
}

@Before
@BeforeEach
public void setUp() throws Exception {
}

@After
@AfterEach
public void tearDown() throws Exception {
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

import javax.net.ssl.SSLContext;

import org.junit.Ignore;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.runner.RunWith;

Expand All @@ -51,7 +51,7 @@ public class DdsClientTest {
String keystoreFile = "keystoreFile";
String keystorePass = "keystorePass";

@Ignore
@Disabled
@Test
public void testConstructor() {
try {
Expand Down Expand Up @@ -84,7 +84,7 @@ public void testConstructor() {
}
}

@Ignore
@Disabled
@Test
public void testConstructorException()
throws DdsClientException, CASException {
Expand All @@ -101,7 +101,7 @@ public void testConstructorException()
}

@SuppressWarnings("unchecked")
@Ignore
@Disabled
@Test
public void testLogin() {
try {
Expand All @@ -123,7 +123,7 @@ public void testLogin() {
}
}

@Ignore
@Disabled
@SuppressWarnings("unchecked")
@Test
public void testLoginException()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

import static org.junit.Assert.*;

import org.junit.After;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import us.dot.its.jpo.ode.dds.DdsRequest.Dialog;
Expand All @@ -35,7 +35,7 @@ public void setUp() throws Exception {
}
}

@After
@AfterEach
public void tearDown() throws Exception {
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
import javax.websocket.Session;
import javax.websocket.WebSocketContainer;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.runner.RunWith;

Expand Down Expand Up @@ -93,19 +93,19 @@ public void onError(Session session, Throwable t) {
}
};

@BeforeClass
@BeforeAll
public static void setUpBeforeClass() throws Exception {
}

@AfterClass
@AfterAll
public static void tearDownAfterClass() throws Exception {
}

@Before
@BeforeEach
public void setUp() throws Exception {
}

@After
@AfterEach
public void tearDown() throws Exception {
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@

import java.io.IOException;

import org.junit.Ignore;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

import com.fasterxml.jackson.core.JsonProcessingException;

public class BrakeAppliedStatusNamesTest {
@Ignore
@Disabled
@Test
public void testBAS() throws JsonProcessingException, IOException {
// JsonNode testInput = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import java.math.BigDecimal;

import org.junit.Before;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

import static org.junit.Assert.assertEquals;

import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand All @@ -36,11 +36,11 @@ public class TimeStampConverterTest {
@Mocked
private Logger logger;

@BeforeClass
@BeforeAll
public static void classSetup() {
}

@Before
@BeforeEach
public void setup() {
new MockUp<LoggerFactory>() {
@Mock
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import org.json.JSONException;
import org.json.JSONObject;
import org.json.XML;
import org.junit.Before;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand All @@ -43,7 +43,7 @@ public class TravelerMessageFromHumanToAsnConverterTest {
@Mocked
private Logger logger;

@Before
@BeforeEach
public void setup() {
new MockUp<LoggerFactory>() {
@Mock
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import java.util.HashSet;
import java.util.Set;

import org.junit.Before;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.boot.info.BuildProperties;
import org.springframework.core.env.Environment;
Expand All @@ -45,7 +45,7 @@ public class OdePropertiesTest {
@Capturing
CommonUtils capturingCommonUtils;

@Before
@BeforeEach
public void setup() {
new Expectations() {
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import java.io.ByteArrayInputStream;
import java.util.List;

import org.junit.BeforeClass;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;

import mockit.Expectations;
Expand Down Expand Up @@ -52,7 +52,7 @@ public class LogFileToAsn1CodecPublisherTest {
@Injectable
StringPublisher injectableStringPublisher;

@BeforeClass
@BeforeAll
public static void setupClass() {
OdeMsgMetadata.setStaticSchemaVersion(OdeProperties.OUTPUT_SCHEMA_VERSION);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import java.nio.file.WatchKey;
import java.nio.file.WatchService;

import org.junit.Ignore;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import java.io.IOException;
import java.util.Vector;

import org.junit.Before;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.mockito.Mock;
import org.snmp4j.PDU;
Expand All @@ -39,7 +39,7 @@ public class RsuSnmpTest {

@Mock private Snmp mockSnmp;

@Before
@BeforeEach
public void setUpSnmp() throws IOException {

//MockitoAnnotations.initMocks(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.json.JSONException;
import org.json.JSONObject;
import org.junit.Ignore;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
Expand Down
Loading

0 comments on commit d8bda6a

Please sign in to comment.