BLogicParamConverterImpl implements BLogicParamConverter { @Override public BLogicParam convertBLogicParam(BatchJobData batchJobData) { BLogicParam blogicParam = new BLogicParam(); beanMapper.map(batchJobData, blogicParam); return blogicParam; } BLogicParamConverterImpl(Mapper beanMapper); @Override BLogicParam convertBLogicParam(BatchJobData batchJobData);  }
@Test public void testConvertBLogicParam01() throws Exception { BatchJobData source = new BatchJobData() { { setCurAppStatus("3"); setErrAppStatus("3"); setAddDateTime(new Timestamp(System.currentTimeMillis())); setUpdDateTime(new Timestamp(System.currentTimeMillis())); setJobAppCd("B000001"); setJobSequenceId("000000001"); setJobArgNm1("jobArgNm1"); setJobArgNm2("jobArgNm2"); setJobArgNm3("jobArgNm3"); setJobArgNm4("jobArgNm4"); setJobArgNm5("jobArgNm5"); setJobArgNm6("jobArgNm6"); setJobArgNm7("jobArgNm7"); setJobArgNm8("jobArgNm8"); setJobArgNm9("jobArgNm9"); setJobArgNm10("jobArgNm10"); setJobArgNm11("jobArgNm11"); setJobArgNm12("jobArgNm12"); setJobArgNm13("jobArgNm13"); setJobArgNm14("jobArgNm14"); setJobArgNm15("jobArgNm15"); setJobArgNm16("jobArgNm16"); setJobArgNm17("jobArgNm17"); setJobArgNm18("jobArgNm18"); setJobArgNm19("jobArgNm19"); setJobArgNm20("jobArgNm20"); } }; BLogicParamConverterImpl blogicParamConverter = new BLogicParamConverterImpl(beanMapper); BLogicParam dist = blogicParamConverter.convertBLogicParam(source); assertThat(dist.getJobAppCd(), is("B000001")); assertThat(dist.getJobSequenceId(), is("000000001")); assertThat(dist.getJobArgNm1(), is("jobArgNm1")); assertThat(dist.getJobArgNm2(), is("jobArgNm2")); assertThat(dist.getJobArgNm3(), is("jobArgNm3")); assertThat(dist.getJobArgNm4(), is("jobArgNm4")); assertThat(dist.getJobArgNm5(), is("jobArgNm5")); assertThat(dist.getJobArgNm6(), is("jobArgNm6")); assertThat(dist.getJobArgNm7(), is("jobArgNm7")); assertThat(dist.getJobArgNm8(), is("jobArgNm8")); assertThat(dist.getJobArgNm9(), is("jobArgNm9")); assertThat(dist.getJobArgNm10(), is("jobArgNm10")); assertThat(dist.getJobArgNm11(), is("jobArgNm11")); assertThat(dist.getJobArgNm12(), is("jobArgNm12")); assertThat(dist.getJobArgNm13(), is("jobArgNm13")); assertThat(dist.getJobArgNm14(), is("jobArgNm14")); assertThat(dist.getJobArgNm15(), is("jobArgNm15")); assertThat(dist.getJobArgNm16(), is("jobArgNm16")); assertThat(dist.getJobArgNm17(), is("jobArgNm17")); assertThat(dist.getJobArgNm18(), is("jobArgNm18")); assertThat(dist.getJobArgNm19(), is("jobArgNm19")); assertThat(dist.getJobArgNm20(), is("jobArgNm20")); }
@Test public void testConvertBLogicParam02() throws Exception { BatchJobData source = new BatchJobData() { { setJobAppCd("B000001"); setJobSequenceId("000000001"); setJobArgNm2("jobArgNm2"); setJobArgNm4("jobArgNm4"); setJobArgNm6("jobArgNm6"); setJobArgNm8("jobArgNm8"); setJobArgNm10("jobArgNm10"); setJobArgNm12("jobArgNm12"); setJobArgNm14("jobArgNm14"); setJobArgNm16("jobArgNm16"); setJobArgNm18("jobArgNm18"); setJobArgNm20("jobArgNm20"); } }; BLogicParamConverterImpl blogicParamConverter = new BLogicParamConverterImpl(beanMapper); BLogicParam dist = blogicParamConverter.convertBLogicParam(source); assertThat(dist.getJobAppCd(), is("B000001")); assertThat(dist.getJobSequenceId(), is("000000001")); assertThat(dist.getJobArgNm1(), nullValue()); assertThat(dist.getJobArgNm2(), is("jobArgNm2")); assertThat(dist.getJobArgNm3(), nullValue()); assertThat(dist.getJobArgNm4(), is("jobArgNm4")); assertThat(dist.getJobArgNm5(), nullValue()); assertThat(dist.getJobArgNm6(), is("jobArgNm6")); assertThat(dist.getJobArgNm7(), nullValue()); assertThat(dist.getJobArgNm8(), is("jobArgNm8")); assertThat(dist.getJobArgNm9(), nullValue()); assertThat(dist.getJobArgNm10(), is("jobArgNm10")); assertThat(dist.getJobArgNm11(), nullValue()); assertThat(dist.getJobArgNm12(), is("jobArgNm12")); assertThat(dist.getJobArgNm13(), nullValue()); assertThat(dist.getJobArgNm14(), is("jobArgNm14")); assertThat(dist.getJobArgNm15(), nullValue()); assertThat(dist.getJobArgNm16(), is("jobArgNm16")); assertThat(dist.getJobArgNm17(), nullValue()); assertThat(dist.getJobArgNm18(), is("jobArgNm18")); assertThat(dist.getJobArgNm19(), nullValue()); assertThat(dist.getJobArgNm20(), is("jobArgNm20")); }
@Test public void testConvertBLogicParam03() throws Exception { BatchJobData source = new BatchJobData() { { setJobArgNm1("jobArgNm1"); setJobArgNm3("jobArgNm3"); setJobArgNm5("jobArgNm5"); setJobArgNm7("jobArgNm7"); setJobArgNm9("jobArgNm9"); setJobArgNm11("jobArgNm11"); setJobArgNm13("jobArgNm13"); setJobArgNm15("jobArgNm15"); setJobArgNm17("jobArgNm17"); setJobArgNm19("jobArgNm19"); } }; BLogicParamConverterImpl blogicParamConverter = new BLogicParamConverterImpl(beanMapper); BLogicParam dist = blogicParamConverter.convertBLogicParam(source); assertThat(dist.getJobAppCd(), nullValue()); assertThat(dist.getJobSequenceId(), nullValue()); assertThat(dist.getJobArgNm1(), is("jobArgNm1")); assertThat(dist.getJobArgNm2(), nullValue()); assertThat(dist.getJobArgNm3(), is("jobArgNm3")); assertThat(dist.getJobArgNm4(), nullValue()); assertThat(dist.getJobArgNm5(), is("jobArgNm5")); assertThat(dist.getJobArgNm6(), nullValue()); assertThat(dist.getJobArgNm7(), is("jobArgNm7")); assertThat(dist.getJobArgNm8(), nullValue()); assertThat(dist.getJobArgNm9(), is("jobArgNm9")); assertThat(dist.getJobArgNm10(), nullValue()); assertThat(dist.getJobArgNm11(), is("jobArgNm11")); assertThat(dist.getJobArgNm12(), nullValue()); assertThat(dist.getJobArgNm13(), is("jobArgNm13")); assertThat(dist.getJobArgNm14(), nullValue()); assertThat(dist.getJobArgNm15(), is("jobArgNm15")); assertThat(dist.getJobArgNm16(), nullValue()); assertThat(dist.getJobArgNm17(), is("jobArgNm17")); assertThat(dist.getJobArgNm18(), nullValue()); assertThat(dist.getJobArgNm19(), is("jobArgNm19")); assertThat(dist.getJobArgNm20(), nullValue()); }