File tree 3 files changed +12
-4
lines changed
Stryker.Core.UnitTest/Mutators
3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -38,5 +38,7 @@ public enum LinqExpression
38
38
OrderDescending ,
39
39
SkipLast ,
40
40
TakeLast ,
41
- UnionBy
41
+ UnionBy ,
42
+ Append ,
43
+ Prepend
42
44
}
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ public class LinqMutatorTest : TestBase
16
16
/// </summary>
17
17
/// <param name="expression"></param>
18
18
/// <returns></returns>
19
- private ExpressionSyntax GenerateExpressions ( string expression )
19
+ private static MemberAccessExpressionSyntax GenerateExpressions ( string expression )
20
20
{
21
21
var tree = CSharpSyntaxTree . ParseText ( $@ "
22
22
using System;
@@ -91,6 +91,8 @@ public void ShouldBeMutationLevelStandard()
91
91
[ DataRow ( LinqExpression . OrderDescending , LinqExpression . Order ) ]
92
92
[ DataRow ( LinqExpression . UnionBy , LinqExpression . IntersectBy ) ]
93
93
[ DataRow ( LinqExpression . IntersectBy , LinqExpression . UnionBy ) ]
94
+ [ DataRow ( LinqExpression . Append , LinqExpression . Prepend ) ]
95
+ [ DataRow ( LinqExpression . Prepend , LinqExpression . Append ) ]
94
96
public void ShouldMutate ( LinqExpression original , LinqExpression expected )
95
97
{
96
98
var target = new LinqMutator ( ) ;
Original file line number Diff line number Diff line change @@ -55,7 +55,9 @@ static LinqMutator()
55
55
{ LinqExpression . Order , LinqExpression . OrderDescending } ,
56
56
{ LinqExpression . OrderDescending , LinqExpression . Order } ,
57
57
{ LinqExpression . UnionBy , LinqExpression . IntersectBy } ,
58
- { LinqExpression . IntersectBy , LinqExpression . UnionBy }
58
+ { LinqExpression . IntersectBy , LinqExpression . UnionBy } ,
59
+ { LinqExpression . Append , LinqExpression . Prepend } ,
60
+ { LinqExpression . Prepend , LinqExpression . Append }
59
61
} ;
60
62
RequireArguments = new HashSet < LinqExpression >
61
63
{
@@ -73,7 +75,9 @@ static LinqMutator()
73
75
LinqExpression . MaxBy ,
74
76
LinqExpression . MinBy ,
75
77
LinqExpression . IntersectBy ,
76
- LinqExpression . UnionBy
78
+ LinqExpression . UnionBy ,
79
+ LinqExpression . Append ,
80
+ LinqExpression . Prepend
77
81
} ;
78
82
}
79
83
/// <summary> Apply mutations to an <see cref="InvocationExpressionSyntax"/> </summary>
You can’t perform that action at this time.
0 commit comments