@@ -9,86 +9,26 @@ namespace ExpressionToString.Tests {
99 public partial class ConstructedBase {
1010 [ Fact ]
1111 [ Trait ( "Category" , Constants ) ]
12- public void Random ( ) => RunTest (
13- Constant ( new Random ( ) ) ,
14- "#Random" ,
15- "#Random" ,
16- "Constant(#Random)"
17- ) ;
12+ public void Random ( ) => PreRunTest ( ) ;
1813
1914 [ Fact ]
2015 [ Trait ( "Category" , Constants ) ]
21- public void ValueTuple ( ) => RunTest (
22- Constant ( ( "abcd" , 5 ) ) ,
23- "(\" abcd\" , 5)" ,
24- "(\" abcd\" , 5)" ,
25- @"Constant((""abcd"", 5))"
26- ) ;
16+ public void ValueTuple ( ) => PreRunTest ( ) ;
2717
2818 [ Fact ]
2919 [ Trait ( "Category" , Constants ) ]
30- public void OldTuple ( ) => RunTest (
31- Constant ( Tuple . Create ( "abcd" , 5 ) ) ,
32- "(\" abcd\" , 5)" ,
33- "(\" abcd\" , 5)" ,
34- @"Constant((""abcd"", 5))"
35- ) ;
20+ public void OldTuple ( ) => PreRunTest ( ) ;
3621
3722 [ Fact ]
3823 [ Trait ( "Category" , Constants ) ]
39- public void DateTime ( ) {
40- // test rendered VB literal
41- var dte = new DateTime ( 1981 , 1 , 1 ) ;
42- RunTest (
43- Constant ( dte ) ,
44- "#DateTime" ,
45- $ "#{ dte . ToString ( ) } #",
46- "Constant(#DateTime)"
47- ) ;
48- }
24+ public void Array ( ) => PreRunTest ( ) ;
4925
5026 [ Fact ]
5127 [ Trait ( "Category" , Constants ) ]
52- public void TimeSpan ( ) {
53- // test rendered VB literal
54- var ts = new TimeSpan ( 5 , 4 , 3 , 2 ) ;
55- RunTest (
56- Constant ( ts ) ,
57- "#TimeSpan" ,
58- $ "#{ ts . ToString ( ) } #",
59- "Constant(#TimeSpan)"
60- ) ;
61- }
28+ public void Type ( ) => PreRunTest ( ) ;
6229
6330 [ Fact ]
6431 [ Trait ( "Category" , Constants ) ]
65- public void Array ( ) => RunTest (
66- Constant ( new object [ ] { "abcd" , 5 , new Random ( ) } ) ,
67- "new[] { \" abcd\" , 5, #Random }" ,
68- "{ \" abcd\" , 5, #Random }" ,
69- @"Constant(new[] { ""abcd"", 5, #Random })"
70- ) ;
71-
72- [ Fact ]
73- [ Trait ( "Category" , Constants ) ]
74- public void Type ( ) => RunTest (
75- Constant ( typeof ( string ) ) ,
76- "typeof(string)" ,
77- "GetType(String)" ,
78- @"Constant(
79- typeof(string)
80- )"
81- ) ;
82-
83- [ Fact ]
84- [ Trait ( "Category" , Constants ) ]
85- public void DifferentTypeForNodeAndValue ( ) => RunTest (
86- Constant ( new List < string > ( ) , typeof ( IEnumerable ) ) ,
87- "#List<string>" ,
88- "#List(Of String)" ,
89- @"Constant(#List<string>,
90- typeof(IEnumerable)
91- )"
92- ) ;
32+ public void DifferentTypeForNodeAndValue ( ) => PreRunTest ( ) ;
9333 }
9434}
0 commit comments