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 CharacterCodeConverterComponentImplTest11 { @Mock TelegramInfoComponent telegramInfoComponent; @InjectMocks CharacterCodeConverterComponentImpl target; @BeforeEach void beforeEacn() { MockitoAnnotations.openMocks(this); } @Test void paddingByteData01() { byte[] bytes = {}; byte[] expected = {}; assertArrayEquals(expected, ReflectionTestUtils.invokeMethod(CharacterCodeConverterComponentImpl.class, "paddingByteData", bytes, 0)); } @Test void paddingByteData02() { byte[] bytes = {}; byte[] expected = { 0 }; assertArrayEquals(expected, ReflectionTestUtils.invokeMethod(CharacterCodeConverterComponentImpl.class, "paddingByteData", bytes, 1)); } @Test void paddingByteData03() { byte[] bytes = {}; byte[] expected = { 0, 0 }; assertArrayEquals(expected, ReflectionTestUtils.invokeMethod(CharacterCodeConverterComponentImpl.class, "paddingByteData", bytes, 2)); } @Test void paddingByteData04() { byte[] bytes = { 1 }; byte[] expected = {}; assertArrayEquals(expected, ReflectionTestUtils.invokeMethod(CharacterCodeConverterComponentImpl.class, "paddingByteData", bytes, 0)); } @Test void paddingByteData05() { byte[] bytes = { 1 }; byte[] expected = { 1 }; assertArrayEquals(expected, ReflectionTestUtils.invokeMethod(CharacterCodeConverterComponentImpl.class, "paddingByteData", bytes, 1)); } @Test void paddingByteData06() { byte[] bytes = { 1 }; byte[] expected = { 1, 0 }; assertArrayEquals(expected, ReflectionTestUtils.invokeMethod(CharacterCodeConverterComponentImpl.class, "paddingByteData", bytes, 2)); } @Test void paddingByteData07() { byte[] bytes = { 1, 2 }; byte[] expected = {}; assertArrayEquals(expected, ReflectionTestUtils.invokeMethod(CharacterCodeConverterComponentImpl.class, "paddingByteData", bytes, 0)); } @Test void paddingByteData08() { byte[] bytes = { 1, 2 }; byte[] expected = { 1 }; assertArrayEquals(expected, ReflectionTestUtils.invokeMethod(CharacterCodeConverterComponentImpl.class, "paddingByteData", bytes, 1)); } @Test void paddingByteData09() { byte[] bytes = { 1, 2 }; byte[] expected = { 1, 2 }; assertArrayEquals(expected, ReflectionTestUtils.invokeMethod(CharacterCodeConverterComponentImpl.class, "paddingByteData", bytes, 2)); } }