Enable more analyzers and various code tweaks/cleanup (#738)

This commit is contained in:
Stephen Toub
2025-09-18 01:48:25 +00:00
committed by GitHub
parent f3264966ff
commit 5e5761b288
326 changed files with 2402 additions and 3642 deletions
@@ -29,23 +29,23 @@ public class DeclarativeWorkflowContextTests
{
// Arrange
TokenCredential credentials = new DefaultAzureCredential();
int maxCallDepth = 10;
int maxExpressionLength = 100;
const int MaxCallDepth = 10;
const int MaxExpressionLength = 100;
ILoggerFactory loggerFactory = LoggerFactory.Create(builder => { });
// Act
Mock<WorkflowAgentProvider> mockProvider = new(MockBehavior.Strict);
DeclarativeWorkflowOptions context = new(mockProvider.Object)
{
MaximumCallDepth = maxCallDepth,
MaximumExpressionLength = maxExpressionLength,
MaximumCallDepth = MaxCallDepth,
MaximumExpressionLength = MaxExpressionLength,
LoggerFactory = loggerFactory
};
// Assert
Assert.Equal(mockProvider.Object, context.AgentProvider);
Assert.Equal(maxCallDepth, context.MaximumCallDepth);
Assert.Equal(maxExpressionLength, context.MaximumExpressionLength);
Assert.Equal(MaxCallDepth, context.MaximumCallDepth);
Assert.Equal(MaxExpressionLength, context.MaximumExpressionLength);
Assert.Same(loggerFactory, context.LoggerFactory);
}
}