- Add OrderModels with all enums and records - Implement IOrderManager interface - Create BasicOrderManager with thread-safe state machine - Add INT8OrderAdapter interface for NT8 integration - Implement MockNT8OrderAdapter for testing - Add comprehensive unit tests (34 tests, all passing) - Full C# 5.0 compliance - >95% code coverage - Zero build warnings for new code Closes Phase 1 OMS implementation
35 lines
863 B
C#
35 lines
863 B
C#
using System;
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
namespace NT8.Core.Tests.Mocks
|
|
{
|
|
/// <summary>
|
|
/// Simple mock implementation of ILogger for testing purposes
|
|
/// </summary>
|
|
public class MockLogger<T> : ILogger<T>
|
|
{
|
|
public IDisposable BeginScope<TState>(TState state)
|
|
{
|
|
return new MockDisposable();
|
|
}
|
|
|
|
public bool IsEnabled(LogLevel logLevel)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
|
|
{
|
|
// Mock implementation - do nothing
|
|
}
|
|
|
|
private class MockDisposable : IDisposable
|
|
{
|
|
public void Dispose()
|
|
{
|
|
// Mock implementation - do nothing
|
|
}
|
|
}
|
|
}
|
|
}
|