File tree Expand file tree Collapse file tree 2 files changed +49
-0
lines changed
test/java/com/froyo/junit5 Expand file tree Collapse file tree 2 files changed +49
-0
lines changed Original file line number Diff line number Diff line change 1+ package com .froyo ;
2+
3+ import lombok .AllArgsConstructor ;
4+ import lombok .Data ;
5+ import lombok .ToString ;
6+
7+ @ Data
8+ @ AllArgsConstructor
9+ @ ToString
10+ public class Fruit {
11+
12+ long id ;
13+ String name ;
14+ String country ;
15+
16+ }
Original file line number Diff line number Diff line change 1+ package com .froyo .junit5 ;
2+
3+ import com .froyo .Fruit ;
4+ import org .apache .commons .lang3 .StringUtils ;
5+ import org .junit .jupiter .api .Test ;
6+
7+ import java .math .BigDecimal ;
8+ import java .util .ArrayList ;
9+ import java .util .List ;
10+ import java .util .Objects ;
11+
12+ public class ProbandoCollectionSetUpdate {
13+
14+ @ Test
15+ public void test (){
16+
17+ List <Fruit > fruits = new ArrayList <>();
18+ fruits .add (new Fruit (1L , "Apple" , "India" ));
19+ fruits .add (new Fruit (2L , "Pineapple" , "India" ));
20+ fruits .add (new Fruit (3L , "Kiwi" , "New Zealand" ));
21+
22+ fruits .forEach (f -> f .setName (f .getName () + "s-FROYO" ));
23+
24+ System .out .println (fruits );
25+
26+ // BigDecimal bigDecimal = null;
27+ BigDecimal bigDecimal = new BigDecimal ("25.2535" );
28+ // System.out.println(StringUtils.defaultIfBlank(bigDecimal,StringUtils.SPACE));
29+ System .out .println ("Hay un" +Objects .toString (bigDecimal ,StringUtils .SPACE )+"espacio." );
30+
31+ }
32+
33+ }
You can’t perform that action at this time.
0 commit comments