mirror of
https://github.com/mapstruct/mapstruct.git
synced 2025-07-12 00:00:08 +08:00
#305 Removing superfluous line breaks
This commit is contained in:
parent
2cabfacbf4
commit
15aa13012e
@ -18,7 +18,8 @@
|
||||
*/
|
||||
package org.mapstruct.ap.test.source.expressions.java;
|
||||
|
||||
import org.mapstruct.ap.test.source.expressions.java.mapper.TimeAndFormat;
|
||||
import static org.fest.assertions.Assertions.assertThat;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Arrays;
|
||||
@ -26,12 +27,11 @@ import java.util.Date;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mapstruct.ap.test.source.expressions.java.mapper.TimeAndFormat;
|
||||
import org.mapstruct.ap.testutil.IssueKey;
|
||||
import org.mapstruct.ap.testutil.WithClasses;
|
||||
import org.mapstruct.ap.testutil.runner.AnnotationProcessorTestRunner;
|
||||
|
||||
import static org.fest.assertions.Assertions.assertThat;
|
||||
import org.mapstruct.ap.testutil.IssueKey;
|
||||
|
||||
/**
|
||||
* @author Sjaak Derksen
|
||||
*/
|
||||
@ -76,7 +76,6 @@ public class JavaExpressionTest {
|
||||
Source2 source2 = new Source2();
|
||||
source2.setAnotherProp( "test" );
|
||||
|
||||
|
||||
Target target = SourceTargetMapperSeveralSources.INSTANCE.sourceToTarget( source1, source2 );
|
||||
|
||||
assertThat( target ).isNotNull();
|
||||
@ -85,7 +84,6 @@ public class JavaExpressionTest {
|
||||
assertThat( target.getAnotherProp() ).isEqualTo( "test" );
|
||||
}
|
||||
|
||||
|
||||
private Date getTime(String format, String date) throws ParseException {
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat( format );
|
||||
Date result = dateFormat.parse( date );
|
||||
@ -103,7 +101,6 @@ public class JavaExpressionTest {
|
||||
source.setTime( time );
|
||||
Target target = new Target();
|
||||
|
||||
|
||||
Target target2 = SourceTargetMapper.INSTANCE.sourceToTargetWithMappingTarget( source, target );
|
||||
|
||||
assertThat( target ).isNotNull();
|
||||
@ -121,7 +118,6 @@ public class JavaExpressionTest {
|
||||
BooleanWorkAroundMapper.class
|
||||
})
|
||||
public void testBooleanGetterWorkAround() throws ParseException {
|
||||
|
||||
SourceBooleanWorkAround source = new SourceBooleanWorkAround();
|
||||
source.setVal( Boolean.TRUE );
|
||||
|
||||
@ -132,27 +128,21 @@ public class JavaExpressionTest {
|
||||
SourceBooleanWorkAround source2 = BooleanWorkAroundMapper.INSTANCE.mapTS( target );
|
||||
assertThat( source2 ).isNotNull();
|
||||
assertThat( source2.isVal() ).isTrue();
|
||||
|
||||
}
|
||||
|
||||
@IssueKey( "305" )
|
||||
@IssueKey( "305" )
|
||||
@Test
|
||||
@WithClasses({
|
||||
SourceList.class,
|
||||
TargetList.class,
|
||||
SourceTargetListMapper.class
|
||||
})
|
||||
})
|
||||
public void testGetterOnly() throws ParseException {
|
||||
|
||||
SourceList source = new SourceList();
|
||||
source.setList( Arrays.asList( "test1" ) );
|
||||
|
||||
TargetList target = SourceTargetListMapper.INSTANCE.map( source );
|
||||
assertThat( target ).isNotNull();
|
||||
assertThat( target.getList() ).isEqualTo( Arrays.asList( "test2" ) );
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user