This repository was archived by the owner on Dec 24, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +3
-11
lines changed
tests/ServiceStack.Text.Tests Expand file tree Collapse file tree 2 files changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -49,16 +49,8 @@ public static UserStat Parse(string userStatString)
4949 return userStat ;
5050 }
5151
52- public override string ToString ( )
53- {
54- return string . Format ( "{0}:{1}:{2}:{3}:{4}:{5}" ,
55- this . UserId . ToString ( "n" ) ,
56- TimesRecommended ,
57- TimesPurchased ,
58- TimesRecommended ,
59- TimesPreviewed ,
60- GetWeightedValue ( ) ) ;
61- }
52+ public override string ToString ( ) =>
53+ $ "{ this . UserId : n} :{ TimesRecommended } :{ TimesPurchased } :{ TimesRecommended } :{ TimesPreviewed } :{ GetWeightedValue ( ) } ";
6254 }
6355
6456 [ TestFixture ]
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ public static StringEnumerable ParseJsv(string value)
3838 public void Create_super_list_type_of_int_from_string ( )
3939 {
4040 var textValue = "1,2,3" ;
41- var convertedValue = textValue . Split ( ',' ) . ToList ( ) . ConvertAll ( x => Convert . ToInt32 ( x ) ) ;
41+ var convertedValue = textValue . Split ( ',' ) . ToList ( ) . ConvertAll ( Convert . ToInt32 ) ;
4242 var result = TypeSerializer . DeserializeFromString < ArrayOfIntId > ( textValue ) ;
4343 Assert . That ( result , Is . EquivalentTo ( convertedValue ) ) ;
4444 }
You can’t perform that action at this time.
0 commit comments