package com.pgf.mqspring.component.impl; import static org.junit.jupiter.api.Assertions.*; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.MockitoAnnotations; import org.springframework.test.util.ReflectionTestUtils; import com.pgf.mqspring.component.TelegramInfoComponent; class CharacterCodeConverterComponentImplTest05 { @Mock TelegramInfoComponent telegramInfoComponent; @InjectMocks CharacterCodeConverterComponentImpl target; @BeforeEach void beforeEacn() { MockitoAnnotations.openMocks(this); } @Test void encodeEbcdicSisoNone01() { byte[] expected = { -16, -16, -16 }; assertArrayEquals(expected, ReflectionTestUtils.invokeMethod(CharacterCodeConverterComponentImpl.class, "encodeEbcdicSisoNone", "000")); } @Test void encodeEbcdicSisoNone02() { byte[] expected = { -16, -16, -16, -16 }; assertArrayEquals(expected, ReflectionTestUtils.invokeMethod(CharacterCodeConverterComponentImpl.class, "encodeEbcdicSisoNone", "0000")); } @Test void encodeEbcdicSisoNone03() { byte[] expected = { 68, -127 }; assertArrayEquals(expected, ReflectionTestUtils.invokeMethod(CharacterCodeConverterComponentImpl.class, "encodeEbcdicSisoNone", "あ")); } @Test void encodeEbcdicSisoNone04() { byte[] expected = { 68, -127, 68, -127 }; assertArrayEquals(expected, ReflectionTestUtils.invokeMethod(CharacterCodeConverterComponentImpl.class, "encodeEbcdicSisoNone", "ああ")); } }