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;
|
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.ParseException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
@ -26,12 +27,11 @@ import java.util.Date;
|
|||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
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.WithClasses;
|
||||||
import org.mapstruct.ap.testutil.runner.AnnotationProcessorTestRunner;
|
import org.mapstruct.ap.testutil.runner.AnnotationProcessorTestRunner;
|
||||||
|
|
||||||
import static org.fest.assertions.Assertions.assertThat;
|
|
||||||
import org.mapstruct.ap.testutil.IssueKey;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Sjaak Derksen
|
* @author Sjaak Derksen
|
||||||
*/
|
*/
|
||||||
@ -76,7 +76,6 @@ public class JavaExpressionTest {
|
|||||||
Source2 source2 = new Source2();
|
Source2 source2 = new Source2();
|
||||||
source2.setAnotherProp( "test" );
|
source2.setAnotherProp( "test" );
|
||||||
|
|
||||||
|
|
||||||
Target target = SourceTargetMapperSeveralSources.INSTANCE.sourceToTarget( source1, source2 );
|
Target target = SourceTargetMapperSeveralSources.INSTANCE.sourceToTarget( source1, source2 );
|
||||||
|
|
||||||
assertThat( target ).isNotNull();
|
assertThat( target ).isNotNull();
|
||||||
@ -85,7 +84,6 @@ public class JavaExpressionTest {
|
|||||||
assertThat( target.getAnotherProp() ).isEqualTo( "test" );
|
assertThat( target.getAnotherProp() ).isEqualTo( "test" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private Date getTime(String format, String date) throws ParseException {
|
private Date getTime(String format, String date) throws ParseException {
|
||||||
SimpleDateFormat dateFormat = new SimpleDateFormat( format );
|
SimpleDateFormat dateFormat = new SimpleDateFormat( format );
|
||||||
Date result = dateFormat.parse( date );
|
Date result = dateFormat.parse( date );
|
||||||
@ -103,7 +101,6 @@ public class JavaExpressionTest {
|
|||||||
source.setTime( time );
|
source.setTime( time );
|
||||||
Target target = new Target();
|
Target target = new Target();
|
||||||
|
|
||||||
|
|
||||||
Target target2 = SourceTargetMapper.INSTANCE.sourceToTargetWithMappingTarget( source, target );
|
Target target2 = SourceTargetMapper.INSTANCE.sourceToTargetWithMappingTarget( source, target );
|
||||||
|
|
||||||
assertThat( target ).isNotNull();
|
assertThat( target ).isNotNull();
|
||||||
@ -121,7 +118,6 @@ public class JavaExpressionTest {
|
|||||||
BooleanWorkAroundMapper.class
|
BooleanWorkAroundMapper.class
|
||||||
})
|
})
|
||||||
public void testBooleanGetterWorkAround() throws ParseException {
|
public void testBooleanGetterWorkAround() throws ParseException {
|
||||||
|
|
||||||
SourceBooleanWorkAround source = new SourceBooleanWorkAround();
|
SourceBooleanWorkAround source = new SourceBooleanWorkAround();
|
||||||
source.setVal( Boolean.TRUE );
|
source.setVal( Boolean.TRUE );
|
||||||
|
|
||||||
@ -132,7 +128,6 @@ public class JavaExpressionTest {
|
|||||||
SourceBooleanWorkAround source2 = BooleanWorkAroundMapper.INSTANCE.mapTS( target );
|
SourceBooleanWorkAround source2 = BooleanWorkAroundMapper.INSTANCE.mapTS( target );
|
||||||
assertThat( source2 ).isNotNull();
|
assertThat( source2 ).isNotNull();
|
||||||
assertThat( source2.isVal() ).isTrue();
|
assertThat( source2.isVal() ).isTrue();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@IssueKey( "305" )
|
@IssueKey( "305" )
|
||||||
@ -143,16 +138,11 @@ public class JavaExpressionTest {
|
|||||||
SourceTargetListMapper.class
|
SourceTargetListMapper.class
|
||||||
})
|
})
|
||||||
public void testGetterOnly() throws ParseException {
|
public void testGetterOnly() throws ParseException {
|
||||||
|
|
||||||
SourceList source = new SourceList();
|
SourceList source = new SourceList();
|
||||||
source.setList( Arrays.asList( "test1" ) );
|
source.setList( Arrays.asList( "test1" ) );
|
||||||
|
|
||||||
TargetList target = SourceTargetListMapper.INSTANCE.map( source );
|
TargetList target = SourceTargetListMapper.INSTANCE.map( source );
|
||||||
assertThat( target ).isNotNull();
|
assertThat( target ).isNotNull();
|
||||||
assertThat( target.getList() ).isEqualTo( Arrays.asList( "test2" ) );
|
assertThat( target.getList() ).isEqualTo( Arrays.asList( "test2" ) );
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user