fix: Accept class parameter for destination instead of class name
This commit is contained in:
@@ -9,7 +9,7 @@ class MapperTest {
|
||||
@Test
|
||||
void testEmptyFieldsMap() {
|
||||
Source source = new Source();
|
||||
Object destination = Mapper.map(source, "np.com.krrish.Destination");
|
||||
Object destination = Mapper.map(source, Destination.class);
|
||||
assertEquals(Destination.class, destination.getClass());
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ class MapperTest {
|
||||
source.setFirst("first");
|
||||
source.setSecond("second");
|
||||
|
||||
Destination destination = (Destination) Mapper.map(source, "np.com.krrish.Destination");
|
||||
Destination destination = (Destination) Mapper.map(source, Destination.class);
|
||||
assertEquals("first", destination.getFirst());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user