Skip to content

Commit bbb6ba0

Browse files
committed
C#: Add more Map like remote flow source testcases.
1 parent 424d909 commit bbb6ba0

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

csharp/ql/test/library-tests/dataflow/flowsources/aspremote/AspRemoteFlowSource.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public object MyAction(ViewModel viewModel)
2525

2626
public class AspRoutingEndpoints
2727
{
28-
public delegate void MapGetHandler(string delegateparam);
28+
public delegate void MapGetHandler(string param);
2929

3030
public void HandlerMethod(string param) { }
3131

@@ -42,7 +42,12 @@ public void M1(string[] args)
4242
app.MapGet("/api/redirect/{lambdaParam}", handler);
4343

4444
MapGetHandler handler2 = HandlerMethod;
45-
app.MapGet("/api/redirect/{param}", handler2);
45+
app.MapGet("/api/redirect/{mapGetParam}", handler2);
46+
47+
app.MapPost("/api/redirect/{mapPostParam}", (string mapPostParam) => { });
48+
app.MapPut("/api/redirect/{mapPutParam}", (string mapPutParam) => { });
49+
app.MapDelete("/api/redirect/{mapDeleteParam}", (string mapDeleteParam) => { });
50+
4651
app.Run();
4752
}
4853
}

csharp/ql/test/library-tests/dataflow/flowsources/aspremote/aspRemoteFlowSource.expected

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@ remoteFlowSources
77
| AspRemoteFlowSource.cs:39:61:39:65 | myApi |
88
| AspRemoteFlowSource.cs:39:75:39:79 | myUrl |
99
| AspRemoteFlowSource.cs:41:46:41:56 | lambdaParam |
10+
| AspRemoteFlowSource.cs:47:65:47:76 | mapPostParam |
11+
| AspRemoteFlowSource.cs:48:63:48:73 | mapPutParam |
12+
| AspRemoteFlowSource.cs:49:69:49:82 | mapDeleteParam |

0 commit comments

Comments
 (0)