test: fix SqlBreakdown tests project
SonarQube Analysis / sonarqube (push) Failing after 3m21s

This commit is contained in:
Thom Lamb
2026-05-15 13:39:14 -05:00
parent 79879c62b4
commit 8b0368e810
30 changed files with 21 additions and 3 deletions
@@ -0,0 +1,31 @@
using Strata.SqlTools.SqlBreakdown.Classes;
using Strata.SqlTools.SqlBreakdown.Expressions;
namespace Strata.SqlTools.SqlBreakdown.Tests.RegisteredTables;
/// <summary>
/// Helper utilities for retrieving registered table column expressions.
/// Provides mock implementations for testing purposes.
/// </summary>
public static class RegisteredTableColumns
{
/// <summary>
/// Gets a registered table column expression for the specified data column ID.
/// Currently returns mock column definitions for testing purposes.
/// </summary>
/// <param name="dataColumnId">The data column identifier (1=DEPARTMENT_ID, 2=NAME, 3=REVENUE, 4=DISCHARGE_DATE).</param>
/// <returns>A registered table column expression for the specified column ID.</returns>
/// <remarks>This is a mock implementation and should be replaced with actual column lookup logic.</remarks>
public static RegisteredTableColumnExpression GetColumn(int dataColumnId)
{
var tableSource = new RegisteredTableSource(1001, "FW", "DEPARTMENT", "DEPT");
return dataColumnId switch
{
1 => new RegisteredTableColumnExpression(dataColumnId, "DEPARTMENT_ID", tableSource),
2 => new RegisteredTableColumnExpression(dataColumnId, "NAME", tableSource),
3 => new RegisteredTableColumnExpression(dataColumnId, "REVENUE", tableSource),
4 => new RegisteredTableColumnExpression(dataColumnId, "DISCHARGE_DATE", tableSource),
_ => new RegisteredTableColumnExpression(dataColumnId, "FOOBAR", tableSource)
};
}
}