@@ -82,6 +82,7 @@ public class CustomAttributeBuilderCtor2
82
82
private const string FieldGetOnlyIntName = "GetInt" ;
83
83
private const string DefaultNotExistFieldName = "DOESNOTEXIST" ;
84
84
private const BindingFlags FieldBindingFlag = BindingFlags . Public | BindingFlags . Instance | BindingFlags . NonPublic ;
85
+ private readonly RandomDataGenerator _generator = new RandomDataGenerator ( ) ;
85
86
86
87
[ Fact ]
87
88
public void PosTest1 ( )
@@ -91,8 +92,8 @@ public void PosTest1()
91
92
int testInt2 = 0 ;
92
93
93
94
str1 = "PosTest1_Arg" ;
94
- testInt1 = TestLibrary . Generator . GetInt32 ( ) ;
95
- testInt2 = TestLibrary . Generator . GetInt32 ( ) ;
95
+ testInt1 = _generator . GetInt32 ( ) ;
96
+ testInt2 = _generator . GetInt32 ( ) ;
96
97
97
98
Type CustomAttributeBuilderTestType = typeof ( CustomAttributeBuilderTest ) ;
98
99
@@ -148,8 +149,8 @@ public void PosTest2()
148
149
int testInt2 = 0 ;
149
150
150
151
str1 = "PosTest2_STR1" ;
151
- testInt1 = TestLibrary . Generator . GetInt32 ( ) ;
152
- testInt2 = TestLibrary . Generator . GetInt32 ( ) ;
152
+ testInt1 = _generator . GetInt32 ( ) ;
153
+ testInt2 = _generator . GetInt32 ( ) ;
153
154
154
155
Type CustomAttributeBuilderTestType = typeof ( CustomAttributeBuilderTest ) ;
155
156
@@ -245,7 +246,7 @@ public void PosTest4()
245
246
int testInt = 0 ;
246
247
247
248
Type CustomAttributeBuilderTestType = typeof ( CustomAttributeBuilderTest ) ;
248
- testInt = TestLibrary . Generator . GetInt32 ( ) ;
249
+ testInt = _generator . GetInt32 ( ) ;
249
250
250
251
Type [ ] ctorParams = new Type [ ]
251
252
{
@@ -296,7 +297,7 @@ public void PosTest5()
296
297
string testString = null ;
297
298
298
299
Type CustomAttributeBuilderTestType = typeof ( CustomAttributeBuilderTest ) ;
299
- testInt = TestLibrary . Generator . GetInt32 ( ) ;
300
+ testInt = _generator . GetInt32 ( ) ;
300
301
testString = "PosTest5_TestString" ;
301
302
302
303
Type [ ] ctorParams = new Type [ ]
@@ -351,8 +352,8 @@ public void PosTest6()
351
352
352
353
testString1 = "PosTest6_TestString1" ;
353
354
testString2 = "PostTest6_TestString2" ;
354
- testInt1 = TestLibrary . Generator . GetInt32 ( ) ;
355
- testInt2 = TestLibrary . Generator . GetInt32 ( ) ;
355
+ testInt1 = _generator . GetInt32 ( ) ;
356
+ testInt2 = _generator . GetInt32 ( ) ;
356
357
357
358
Type CustomAttributeBuilderTestType = typeof ( CustomAttributeBuilderTest ) ;
358
359
@@ -487,8 +488,8 @@ public void NegTest2()
487
488
Type CustomAttributeBuilderTestType = typeof ( CustomAttributeBuilderTest ) ;
488
489
489
490
testString =
490
- TestLibrary . Generator . GetString ( false , MinStringLength , MaxStringLength ) ;
491
- testInt = TestLibrary . Generator . GetInt32 ( ) ;
491
+ _generator . GetString ( false , MinStringLength , MaxStringLength ) ;
492
+ testInt = _generator . GetInt32 ( ) ;
492
493
493
494
Type [ ] ctorParams = new Type [ ]
494
495
{
@@ -566,8 +567,8 @@ public void NegTest5()
566
567
int testInt1 = 0 ;
567
568
568
569
testString1 =
569
- TestLibrary . Generator . GetString ( false , MinStringLength , MaxStringLength ) ;
570
- testInt1 = TestLibrary . Generator . GetInt32 ( ) ;
570
+ _generator . GetString ( false , MinStringLength , MaxStringLength ) ;
571
+ testInt1 = _generator . GetInt32 ( ) ;
571
572
572
573
Type CustomAttributeBuilderTestType = typeof ( CustomAttributeBuilderTest ) ;
573
574
@@ -606,8 +607,8 @@ public void NegTest6()
606
607
string testString1 = null ;
607
608
int testInt1 = 0 ;
608
609
testString1 =
609
- TestLibrary . Generator . GetString ( false , MinStringLength , MaxStringLength ) ;
610
- testInt1 = TestLibrary . Generator . GetInt32 ( ) ;
610
+ _generator . GetString ( false , MinStringLength , MaxStringLength ) ;
611
+ testInt1 = _generator . GetInt32 ( ) ;
611
612
612
613
Type CustomAttributeBuilderTestType = typeof ( CustomAttributeBuilderTest ) ;
613
614
@@ -645,8 +646,8 @@ public void NegTest7()
645
646
int testInt1 = 0 ;
646
647
647
648
testString1 =
648
- TestLibrary . Generator . GetString ( false , MinStringLength , MaxStringLength ) ;
649
- testInt1 = TestLibrary . Generator . GetInt32 ( ) ;
649
+ _generator . GetString ( false , MinStringLength , MaxStringLength ) ;
650
+ testInt1 = _generator . GetInt32 ( ) ;
650
651
651
652
Type CustomAttributeBuilderTestType = typeof ( CustomAttributeBuilderTest ) ;
652
653
@@ -683,7 +684,7 @@ public void NegTest8()
683
684
string testString1 = null ;
684
685
685
686
testString1 =
686
- TestLibrary . Generator . GetString ( false , MinStringLength , MaxStringLength ) ;
687
+ _generator . GetString ( false , MinStringLength , MaxStringLength ) ;
687
688
688
689
Type CustomAttributeBuilderTestType = typeof ( CustomAttributeBuilderTest ) ;
689
690
@@ -718,7 +719,7 @@ public void NegTest9()
718
719
string testString1 = null ;
719
720
720
721
testString1 =
721
- TestLibrary . Generator . GetString ( false , MinStringLength , MaxStringLength ) ;
722
+ _generator . GetString ( false , MinStringLength , MaxStringLength ) ;
722
723
723
724
Type CustomAttributeBuilderTestType = typeof ( CustomAttributeBuilderTest ) ;
724
725
@@ -750,7 +751,7 @@ public void NegTest10()
750
751
string testString1 = null ;
751
752
752
753
testString1 =
753
- TestLibrary . Generator . GetString ( false , MinStringLength , MaxStringLength ) ;
754
+ _generator . GetString ( false , MinStringLength , MaxStringLength ) ;
754
755
755
756
Type CustomAttributeBuilderTestType = typeof ( CustomAttributeBuilderTest ) ;
756
757
@@ -782,7 +783,7 @@ public void NegTest11()
782
783
string testString1 = null ;
783
784
784
785
testString1 =
785
- TestLibrary . Generator . GetString ( false , MinStringLength , MaxStringLength ) ;
786
+ _generator . GetString ( false , MinStringLength , MaxStringLength ) ;
786
787
787
788
Type CustomAttributeBuilderTestType = typeof ( CustomAttributeBuilderTest ) ;
788
789
@@ -813,7 +814,7 @@ public void NegTest12()
813
814
string testString1 = null ;
814
815
815
816
testString1 =
816
- TestLibrary . Generator . GetString ( false , MinStringLength , MaxStringLength ) ;
817
+ _generator . GetString ( false , MinStringLength , MaxStringLength ) ;
817
818
818
819
Type CustomAttributeBuilderTestType = typeof ( CustomAttributeBuilderTest ) ;
819
820
@@ -845,8 +846,8 @@ public void NegTest13()
845
846
int testInt = 0 ;
846
847
847
848
testString =
848
- TestLibrary . Generator . GetString ( false , MinStringLength , MaxStringLength ) ;
849
- testInt = TestLibrary . Generator . GetInt32 ( ) ;
849
+ _generator . GetString ( false , MinStringLength , MaxStringLength ) ;
850
+ testInt = _generator . GetInt32 ( ) ;
850
851
851
852
Type CustomAttributeBuilderTestType = typeof ( CustomAttributeBuilderTest ) ;
852
853
@@ -888,8 +889,8 @@ public void NegTest14()
888
889
string testString = null ;
889
890
890
891
testString =
891
- TestLibrary . Generator . GetString ( false , MinStringLength , MaxStringLength ) ;
892
- testInt = TestLibrary . Generator . GetInt32 ( ) ;
892
+ _generator . GetString ( false , MinStringLength , MaxStringLength ) ;
893
+ testInt = _generator . GetInt32 ( ) ;
893
894
894
895
Type CustomAttributeBuilderTestType = typeof ( CustomAttributeBuilderTest ) ;
895
896
@@ -931,8 +932,8 @@ public void NegTest15()
931
932
int testInt = 0 ;
932
933
933
934
testString =
934
- TestLibrary . Generator . GetString ( false , MinStringLength , MaxStringLength ) ;
935
- testInt = TestLibrary . Generator . GetInt32 ( ) ;
935
+ _generator . GetString ( false , MinStringLength , MaxStringLength ) ;
936
+ testInt = _generator . GetInt32 ( ) ;
936
937
937
938
Type CustomAttributeBuilderTestType = typeof ( CustomAttributeBuilderTest ) ;
938
939
0 commit comments