Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cc4e264

Browse files
committed
C#: Add test case for CaptureSummaryModels query.
1 parent b4efd0e commit cc4e264

3 files changed

Lines changed: 35 additions & 0 deletions

File tree

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
| Sources;NewSources;false;WrapConsoleReadKey;();ReturnValue;local |
2+
| Sources;NewSources;false;WrapConsoleReadLine;();ReturnValue;local |
3+
| Sources;NewSources;false;WrapConsoleReadLineAndProcees;(System.String);ReturnValue;local |
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
utils/model-generator/CaptureSourceModels.ql
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
using System;
2+
3+
namespace Sources;
4+
5+
public class NewSources
6+
{
7+
// New source
8+
public string? WrapConsoleReadLine()
9+
{
10+
return Console.ReadLine();
11+
}
12+
13+
// New source
14+
public string WrapConsoleReadLineAndProcees(string prompt)
15+
{
16+
var s = Console.ReadLine();
17+
return string.IsNullOrEmpty(s) ? "" : s.ToUpper();
18+
}
19+
20+
// NOT new source as method is private
21+
private string? PrivateWrapConsoleReadLine()
22+
{
23+
return Console.ReadLine();
24+
}
25+
26+
// New source
27+
public ConsoleKeyInfo WrapConsoleReadKey()
28+
{
29+
return Console.ReadKey();
30+
}
31+
}

0 commit comments

Comments
 (0)