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)
49
49
return userStat ;
50
50
}
51
51
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 ( ) } ";
62
54
}
63
55
64
56
[ TestFixture ]
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ public static StringEnumerable ParseJsv(string value)
38
38
public void Create_super_list_type_of_int_from_string ( )
39
39
{
40
40
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 ) ;
42
42
var result = TypeSerializer . DeserializeFromString < ArrayOfIntId > ( textValue ) ;
43
43
Assert . That ( result , Is . EquivalentTo ( convertedValue ) ) ;
44
44
}
You can’t perform that action at this time.
0 commit comments