Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
2.6 kB
1
Indexable
Never
package br.com.senior.erpxcomven.pedido.converter.impl;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;

import java.util.Optional;

import org.junit.Before;
import org.junit.Test;

import br.com.senior.erpxcomven.foundation.E001endEntity;
import br.com.senior.erpxcomven.foundation.E001pesEntity;
import br.com.senior.erpxcomven.foundation.E007ufsEntity;
import br.com.senior.erpxcomven.foundation.E008raiEntity;
import br.com.senior.erpxcomven.foundation.E021motEntity;
import br.com.senior.erpxcomven.foundation.E070filEntity;
import br.com.senior.erpxcomven.foundation.E085hcl_com_gerEntity;
import br.com.senior.erpxcomven.foundation.repository.E085hcl_com_gerRepository;
import br.com.senior.erpxcomven.pedido.E120infEntity;
import br.com.senior.erpxcomven.pedido.EnumExternalAggregationType;
import br.com.senior.erpxcomven.pedido.ExternalOrderAggregationEntity;
import br.com.senior.erpxcomven.pedido.RecE007ufs;
import br.com.senior.erpxcomven.pedido.RecE008rai;
import br.com.senior.erpxcomven.pedido.RecE120inf;
import br.com.senior.erpxcomven.pedido.dto.GetAdditionalSaleInformationProjection;
import br.com.senior.erpxcomven.pedido.repository.ExternalOrderAggregationRepository;

public class RecE120infConverterTest {

	private RecE120infConverter recE120infConverter;
	private GetAdditionalSaleInformationProjection projection;
	
	@Before
	public void setup() {
		recE120infConverter = new RecE120infConverter();
		projection = new GetAdditionalSaleInformationProjection();
		projection.setE120inf(new E120infEntity());
		projection.setE070fil(new E070filEntity());
		projection.setE001endEnt(new E001endEntity());
		projection.setE001pesTra(new E001pesEntity());
		projection.setE001pesRed(new E001pesEntity());
		projection.setE021motInf(new E021motEntity());
		projection.setE008raiInf(new E008raiEntity());
		projection.setE007ufsRaiInf(new E007ufsEntity());
		projection.setE007ufsVei(new E007ufsEntity());
	}

	@Test
	public void testRetornarInfAdicionais() {
		E120infEntity e120inf = projection.getE120inf();
		e120inf.setId(1L);
		e120inf.setObsPed("Obs Ped");
		e120inf.setAcePar(true);
		e120inf.setPedCli("Ped Cli");
		e120inf.setCodVia(2);
		e120inf.setPlaVei("Pla Vei");
		e120inf.setVlrFre(10.0);
		e120inf.setCifFob(20);
		e120inf.setVlrFrd(30.0);
		e120inf.setVlrSeg(40.0);
		e120inf.setVlrEmb(50.0);
		e120inf.setVlrEnc(60.0);
		e120inf.setVlrOut(70.0);
		e120inf.setVlrOud(80.0);
		e120inf.setPerDad(90.0);
		e120inf.setVlrDad(100.