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 44using System . Data ;
55using System . Diagnostics . CodeAnalysis ;
66using System . Linq ;
7+ using Xunit ;
78
89namespace FluentAssertions . DataSets . Specs ;
910
@@ -588,17 +589,24 @@ public enum ChangeType
588589 Removed ,
589590 }
590591
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 > ( ) ) ;
593594
594- public static IEnumerable < object [ ] > AllChangeTypesWithAcceptChangesValues
595+ public static TheoryData < ChangeType , bool > AllChangeTypesWithAcceptChangesValues
595596 {
596597 get
597598 {
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 ;
602610 }
603611 }
604612
You can’t perform that action at this time.
0 commit comments