C#: Add test case for CaptureSummaryModels query.

This commit is contained in:
Michael Nebel
2022-03-18 10:55:26 +01:00
parent b4efd0e154
commit cc4e26466f
3 changed files with 35 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
| Sources;NewSources;false;WrapConsoleReadKey;();ReturnValue;local |
| Sources;NewSources;false;WrapConsoleReadLine;();ReturnValue;local |
| Sources;NewSources;false;WrapConsoleReadLineAndProcees;(System.String);ReturnValue;local |

View File

@@ -0,0 +1 @@
utils/model-generator/CaptureSourceModels.ql

View File

@@ -0,0 +1,31 @@
using System;
namespace Sources;
public class NewSources
{
// New source
public string? WrapConsoleReadLine()
{
return Console.ReadLine();
}
// New source
public string WrapConsoleReadLineAndProcees(string prompt)
{
var s = Console.ReadLine();
return string.IsNullOrEmpty(s) ? "" : s.ToUpper();
}
// NOT new source as method is private
private string? PrivateWrapConsoleReadLine()
{
return Console.ReadLine();
}
// New source
public ConsoleKeyInfo WrapConsoleReadKey()
{
return Console.ReadKey();
}
}