Merge branch 'master' into bael-16656

This commit is contained in:
Josh Cummings
2019-10-26 15:37:05 -06:00
committed by GitHub
parent db85c8f275
commit 0be2175c89
20539 changed files with 1643630 additions and 0 deletions
@@ -0,0 +1,24 @@
package com.baeldung.mapper;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
import com.baeldung.dto.CarDTO;
import com.baeldung.entity.Car;
public class CarMapperUnitTest {
@Test
public void givenCarEntitytoCar_whenMaps_thenCorrect() {
Car entity = new Car();
entity.setId(1);
entity.setName("Toyota");
CarDTO carDto = CarMapper.INSTANCE.carToCarDTO(entity);
assertEquals(carDto.getId(), entity.getId());
assertEquals(carDto.getName(), entity.getName());
}
}