Refactor
Build and Test j3270 / Build JAR & Run Tests (push) Successful in 44s

This commit is contained in:
2026-08-25 16:05:12 +00:00
parent 36b93df986
commit 7eebd2107c
56 changed files with 308 additions and 308 deletions
@@ -1,4 +1,4 @@
package org.lib3270j.charset;
package haus.nightmare.lib3270j.charset;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
@@ -1,12 +1,12 @@
package org.lib3270j.datastream;
package haus.nightmare.lib3270j.datastream;
import org.junit.jupiter.api.Test;
import org.lib3270j.TerminalModel;
import org.lib3270j.charset.EbcdicTranslator;
import org.lib3270j.screen.ScreenBuffer;
import org.lib3270j.screen.ExtendedAttribute;
import haus.nightmare.lib3270j.TerminalModel;
import haus.nightmare.lib3270j.charset.EbcdicTranslator;
import haus.nightmare.lib3270j.screen.ScreenBuffer;
import haus.nightmare.lib3270j.screen.ExtendedAttribute;
import static org.junit.jupiter.api.Assertions.*;
import static org.lib3270j.protocol.DS3270Constants.*;
import static haus.nightmare.lib3270j.protocol.DS3270Constants.*;
public class DataStreamProcessorTest {
@@ -69,7 +69,7 @@ public class DataStreamProcessorTest {
@Test
public void testReadBufferPropagatesLastAid() {
org.lib3270j.input.InputProcessor input = new org.lib3270j.input.InputProcessor(screen, translator, null);
haus.nightmare.lib3270j.input.InputProcessor input = new haus.nightmare.lib3270j.input.InputProcessor(screen, translator, null);
processor.setInputProcessor(input);
input.setLastAid(AID_ENTER);
@@ -1,12 +1,12 @@
package org.lib3270j.datastream;
package haus.nightmare.lib3270j.datastream;
import org.junit.jupiter.api.Test;
import org.lib3270j.TerminalModel;
import org.lib3270j.charset.EbcdicTranslator;
import org.lib3270j.graphics.GraphicsMode;
import org.lib3270j.screen.ScreenBuffer;
import haus.nightmare.lib3270j.TerminalModel;
import haus.nightmare.lib3270j.charset.EbcdicTranslator;
import haus.nightmare.lib3270j.graphics.GraphicsMode;
import haus.nightmare.lib3270j.screen.ScreenBuffer;
import static org.junit.jupiter.api.Assertions.*;
import static org.lib3270j.protocol.DS3270Constants.*;
import static haus.nightmare.lib3270j.protocol.DS3270Constants.*;
public class QueryReplyBuilderTest {
@@ -1,4 +1,4 @@
package org.lib3270j.ft;
package haus.nightmare.lib3270j.ft;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
@@ -1,4 +1,4 @@
package org.lib3270j.graphics;
package haus.nightmare.lib3270j.graphics;
import org.junit.jupiter.api.Test;
import java.io.ByteArrayOutputStream;
@@ -274,10 +274,10 @@ public class GocaDecoderTest {
@Test
public void testDirectObjectControlSf24() {
org.lib3270j.screen.ScreenBuffer sb = new org.lib3270j.screen.ScreenBuffer(
org.lib3270j.TerminalModel.IBM_3279_4, new org.lib3270j.charset.EbcdicTranslator());
org.lib3270j.datastream.DataStreamProcessor dsp = new org.lib3270j.datastream.DataStreamProcessor(
sb, new org.lib3270j.charset.EbcdicTranslator());
haus.nightmare.lib3270j.screen.ScreenBuffer sb = new haus.nightmare.lib3270j.screen.ScreenBuffer(
haus.nightmare.lib3270j.TerminalModel.IBM_3279_4, new haus.nightmare.lib3270j.charset.EbcdicTranslator());
haus.nightmare.lib3270j.datastream.DataStreamProcessor dsp = new haus.nightmare.lib3270j.datastream.DataStreamProcessor(
sb, new haus.nightmare.lib3270j.charset.EbcdicTranslator());
// First draw something on graphics plane
dsp.getGraphicsPlane().setPixel(10, 10, 0xFFFFFFFF);
@@ -285,10 +285,10 @@ public class GocaDecoderTest {
// Send WSF with SF_OBJCNTL (0x24) containing P_ERASE (0x0A)
byte[] wsf = new byte[] {
(byte) org.lib3270j.protocol.DS3270Constants.CMD_WSF,
(byte) haus.nightmare.lib3270j.protocol.DS3270Constants.CMD_WSF,
0x00, 0x04, // Field length = 4
(byte) org.lib3270j.graphics.GocaConstants.SF_OBJCNTL, // 0x24
(byte) org.lib3270j.graphics.GocaConstants.P_ERASE // 0x0A
(byte) haus.nightmare.lib3270j.graphics.GocaConstants.SF_OBJCNTL, // 0x24
(byte) haus.nightmare.lib3270j.graphics.GocaConstants.P_ERASE // 0x0A
};
dsp.processRecord(wsf, 0, wsf.length, false);
@@ -1,7 +1,7 @@
package org.lib3270j.graphics;
package haus.nightmare.lib3270j.graphics;
import org.junit.jupiter.api.Test;
import org.lib3270j.ConnectionConfig;
import haus.nightmare.lib3270j.ConnectionConfig;
import static org.junit.jupiter.api.Assertions.*;
public class GraphicsModeTest {
@@ -1,4 +1,4 @@
package org.lib3270j.graphics;
package haus.nightmare.lib3270j.graphics;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
@@ -1,13 +1,13 @@
package org.lib3270j.input;
package haus.nightmare.lib3270j.input;
import org.junit.jupiter.api.Test;
import org.lib3270j.TerminalModel;
import org.lib3270j.charset.EbcdicTranslator;
import org.lib3270j.datastream.DataStreamProcessor;
import org.lib3270j.screen.ScreenBuffer;
import org.lib3270j.telnet.TelnetFSM;
import haus.nightmare.lib3270j.TerminalModel;
import haus.nightmare.lib3270j.charset.EbcdicTranslator;
import haus.nightmare.lib3270j.datastream.DataStreamProcessor;
import haus.nightmare.lib3270j.screen.ScreenBuffer;
import haus.nightmare.lib3270j.telnet.TelnetFSM;
import static org.junit.jupiter.api.Assertions.*;
import static org.lib3270j.protocol.DS3270Constants.*;
import static haus.nightmare.lib3270j.protocol.DS3270Constants.*;
public class InputProcessorTest {
@@ -135,7 +135,7 @@ public class InputProcessorTest {
@Test
public void testGraphicInputBuilderStructure() {
byte[] sf = org.lib3270j.graphics.GraphicInputBuilder.buildGraphicInput(100, -50, AID_ENTER, false, false, false);
byte[] sf = haus.nightmare.lib3270j.graphics.GraphicInputBuilder.buildGraphicInput(100, -50, AID_ENTER, false, false, false);
assertEquals(56, sf.length);
assertEquals(0x00, sf[0]);
assertEquals(0x34, sf[1]); // Length = 52
@@ -1,8 +1,8 @@
package org.lib3270j.protocol;
package haus.nightmare.lib3270j.protocol;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
import static org.lib3270j.protocol.DS3270Constants.*;
import static haus.nightmare.lib3270j.protocol.DS3270Constants.*;
public class DS3270ConstantsTest {
@@ -1,10 +1,10 @@
package org.lib3270j.screen;
package haus.nightmare.lib3270j.screen;
import org.junit.jupiter.api.Test;
import org.lib3270j.TerminalModel;
import org.lib3270j.charset.EbcdicTranslator;
import haus.nightmare.lib3270j.TerminalModel;
import haus.nightmare.lib3270j.charset.EbcdicTranslator;
import static org.junit.jupiter.api.Assertions.*;
import static org.lib3270j.protocol.DS3270Constants.*;
import static haus.nightmare.lib3270j.protocol.DS3270Constants.*;
public class ScreenBufferTest {
@@ -1,14 +1,14 @@
package org.lib3270j.telnet;
package haus.nightmare.lib3270j.telnet;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.lib3270j.ConnectionConfig;
import org.lib3270j.ConnectionState;
import org.lib3270j.TerminalModel;
import org.lib3270j.charset.EbcdicTranslator;
import org.lib3270j.datastream.DataStreamProcessor;
import org.lib3270j.protocol.TelnetConstants;
import org.lib3270j.screen.ScreenBuffer;
import haus.nightmare.lib3270j.ConnectionConfig;
import haus.nightmare.lib3270j.ConnectionState;
import haus.nightmare.lib3270j.TerminalModel;
import haus.nightmare.lib3270j.charset.EbcdicTranslator;
import haus.nightmare.lib3270j.datastream.DataStreamProcessor;
import haus.nightmare.lib3270j.protocol.TelnetConstants;
import haus.nightmare.lib3270j.screen.ScreenBuffer;
import java.io.ByteArrayOutputStream;
import java.util.ArrayList;
@@ -1,8 +1,8 @@
package org.lib3270j.tls;
package haus.nightmare.lib3270j.tls;
import org.junit.jupiter.api.Test;
import org.lib3270j.ConnectionConfig;
import org.lib3270j.TerminalModel;
import haus.nightmare.lib3270j.ConnectionConfig;
import haus.nightmare.lib3270j.TerminalModel;
import javax.net.ssl.SSLContext;
import java.security.cert.CertificateException;