Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Cli.Tests/EndToEndTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ public void TestUpdateEntity()

Assert.IsTrue(_runtimeConfigLoader!.TryLoadConfig(TEST_RUNTIME_CONFIG_FILE, out RuntimeConfig? updateRuntimeConfig));
Assert.IsNotNull(updateRuntimeConfig);
Assert.AreEqual(TEST_ENV_CONN_STRING, updateRuntimeConfig.DataSource.ConnectionString);
Assert.AreEqual(TEST_ENV_CONN_STRING, updateRuntimeConfig.DataSource!.ConnectionString);
Comment thread
RubenCerna2079 marked this conversation as resolved.
Assert.AreEqual(2, updateRuntimeConfig.Entities.Count()); // No new entity added

Assert.IsTrue(updateRuntimeConfig.Entities.ContainsKey("todo"));
Expand Down
2 changes: 1 addition & 1 deletion src/Cli.Tests/ValidateConfigTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,7 @@ private static Entity BuildSimpleEntity(string source)
{
return new Entity(
Source: new EntitySource(Object: source, Type: EntitySourceType.Table, Parameters: null, KeyFields: null),
GraphQL: new(Singular: null, Plural: null),
GraphQL: new(Singular: string.Empty, Plural: string.Empty),
Fields: null,
Rest: new(EntityRestOptions.DEFAULT_SUPPORTED_VERBS),
Permissions: new[] { new EntityPermission("anonymous", new[] { new EntityAction(EntityActionOperation.Read, null, null) }) },
Expand Down
6 changes: 3 additions & 3 deletions src/Service.Tests/Configuration/RuntimeConfigLoaderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,9 @@ public async Task ChildConfigWithMissingEnvVarsLoadsSuccessfully()
}";

// Save original env var values and clear them to ensure they don't exist.
string? origEndpoint = Environment.GetEnvironmentVariable("NONEXISTENT_OTEL_ENDPOINT");
string? origHeaders = Environment.GetEnvironmentVariable("NONEXISTENT_OTEL_HEADERS");
string? origServiceName = Environment.GetEnvironmentVariable("NONEXISTENT_OTEL_SERVICE_NAME");
string origEndpoint = Environment.GetEnvironmentVariable("NONEXISTENT_OTEL_ENDPOINT");
string origHeaders = Environment.GetEnvironmentVariable("NONEXISTENT_OTEL_HEADERS");
string origServiceName = Environment.GetEnvironmentVariable("NONEXISTENT_OTEL_SERVICE_NAME");
Environment.SetEnvironmentVariable("NONEXISTENT_OTEL_ENDPOINT", null);
Environment.SetEnvironmentVariable("NONEXISTENT_OTEL_HEADERS", null);
Environment.SetEnvironmentVariable("NONEXISTENT_OTEL_SERVICE_NAME", null);
Expand Down
8 changes: 4 additions & 4 deletions src/Service.Tests/UnitTests/RequestParserUnitTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class RequestParserUnitTests
public void ExtractRawQueryParameter_PreservesEncoding(string queryString, string parameterName, string expectedValue)
{
// Call the internal method directly (no reflection needed)
string? result = RequestParser.ExtractRawQueryParameter(queryString, parameterName);
string result = RequestParser.ExtractRawQueryParameter(queryString, parameterName);

Assert.AreEqual(expectedValue, result,
$"Expected '{expectedValue}' but got '{result}' for parameter '{parameterName}' in query '{queryString}'");
Expand All @@ -49,10 +49,10 @@ public void ExtractRawQueryParameter_PreservesEncoding(string queryString, strin
[DataRow("", "$filter", DisplayName = "Empty query string")]
[DataRow(null, "$filter", DisplayName = "Null query string")]
[DataRow("?otherParam=value", "$filter", DisplayName = "Different parameter")]
public void ExtractRawQueryParameter_ReturnsNull_WhenParameterNotFound(string? queryString, string parameterName)
public void ExtractRawQueryParameter_ReturnsNull_WhenParameterNotFound(string queryString, string parameterName)
{
// Call the internal method directly (no reflection needed)
string? result = RequestParser.ExtractRawQueryParameter(queryString, parameterName);
string result = RequestParser.ExtractRawQueryParameter(queryString, parameterName);

Assert.IsNull(result,
$"Expected null but got '{result}' for parameter '{parameterName}' in query '{queryString}'");
Expand All @@ -71,7 +71,7 @@ public void ExtractRawQueryParameter_ReturnsNull_WhenParameterNotFound(string? q
public void ExtractRawQueryParameter_HandlesEdgeCases(string queryString, string parameterName, string expectedValue)
{
// Call the internal method directly (no reflection needed)
string? result = RequestParser.ExtractRawQueryParameter(queryString, parameterName);
string result = RequestParser.ExtractRawQueryParameter(queryString, parameterName);

Assert.AreEqual(expectedValue, result,
$"Expected '{expectedValue}' but got '{result}' for parameter '{parameterName}' in query '{queryString}'");
Expand Down
8 changes: 4 additions & 4 deletions src/Service.Tests/UnitTests/SqlQueryExecutorUnitTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -950,8 +950,8 @@ public void TestOboNoUserContext_UsesBaseConnectionString()
[DataRow(null, null, "iss and oid/sub",
DisplayName = "Authenticated user with no claims throws OboAuthenticationFailure")]
public void TestOboEnabled_AuthenticatedUserMissingClaims_ThrowsException(
string? issuer,
string? objectId,
string issuer,
string objectId,
string missingClaimDescription)
{
// Arrange - Create an authenticated HttpContext with incomplete claims
Expand Down Expand Up @@ -986,8 +986,8 @@ public void TestOboEnabled_AuthenticatedUserMissingClaims_ThrowsException(
/// <param name="objectId">The oid claim value, or null to omit.</param>
/// <returns>A configured HttpContextAccessor mock with authenticated user.</returns>
private static Mock<IHttpContextAccessor> CreateHttpContextAccessorWithAuthenticatedUserMissingClaims(
string? issuer,
string? objectId)
string issuer,
string objectId)
{
Mock<IHttpContextAccessor> httpContextAccessor = new();
DefaultHttpContext context = new();
Expand Down
Loading