File tree Expand file tree Collapse file tree 1 file changed +15
-7
lines changed
Tests/FluentAssertions.DataSets.Specs Expand file tree Collapse file tree 1 file changed +15
-7
lines changed Original file line number Diff line number Diff line change 4
4
using System . Data ;
5
5
using System . Diagnostics . CodeAnalysis ;
6
6
using System . Linq ;
7
+ using Xunit ;
7
8
8
9
namespace FluentAssertions . DataSets . Specs ;
9
10
@@ -588,17 +589,24 @@ public enum ChangeType
588
589
Removed ,
589
590
}
590
591
591
- public static IEnumerable < object [ ] > AllChangeTypes =>
592
- Enum . GetValues ( typeof ( ChangeType ) ) . Cast < ChangeType > ( ) . Select ( t => new object [ ] { t } ) ;
592
+ public static TheoryData < ChangeType > AllChangeTypes =>
593
+ new ( Enum . GetValues ( typeof ( ChangeType ) ) . Cast < ChangeType > ( ) ) ;
593
594
594
- public static IEnumerable < object [ ] > AllChangeTypesWithAcceptChangesValues
595
+ public static TheoryData < ChangeType , bool > AllChangeTypesWithAcceptChangesValues
595
596
{
596
597
get
597
598
{
598
- return
599
- from changeType in Enum . GetValues ( typeof ( ChangeType ) ) . Cast < ChangeType > ( )
600
- from acceptChanges in new [ ] { true , false }
601
- select new object [ ] { changeType , acceptChanges } ;
599
+ var result = new TheoryData < ChangeType , bool > ( ) ;
600
+
601
+ foreach ( var changeType in Enum . GetValues ( typeof ( ChangeType ) ) . Cast < ChangeType > ( ) )
602
+ {
603
+ foreach ( var acceptChanges in new [ ] { true , false } )
604
+ {
605
+ result . Add ( changeType , acceptChanges ) ;
606
+ }
607
+ }
608
+
609
+ return result ;
602
610
}
603
611
}
604
612
You can’t perform that action at this time.
0 commit comments