=== Summary: 675 files | 7 generated | 484 fresh | 4605 untracked | 4268 adopted | 355 marked | 466 validated-ok | 2+0 stale (sig+body) | 0 skipped | 0 failed | elapsed 11:08:11.442 (40091.44s) ===
This commit is contained in:
@@ -7,6 +7,7 @@ namespace adas_core.Test.Models;
|
||||
/// <summary>
|
||||
/// Represents a fake implementation of the ILogger interface, typically used as a test double to simulate logging behavior.
|
||||
/// </summary>
|
||||
/// <!-- aidoc:v1 sig=274aadb -->
|
||||
public class FakeLogger : ILogger
|
||||
{
|
||||
public List<string> Messages { get; } = [];
|
||||
@@ -16,6 +17,7 @@ public class FakeLogger : ILogger
|
||||
/// </summary>
|
||||
/// <param name="enrichers">The collection of enrichers intended to add contextual properties to log events.</param>
|
||||
/// <returns>The current <see cref="ILogger"/> instance, without the supplied enrichers applied.</returns>
|
||||
/// <!-- aidoc:v1 sig=2988ec2 body=62e89c5 -->
|
||||
public ILogger ForContext(IEnumerable<ILogEventEnricher> enrichers)
|
||||
{
|
||||
return this;
|
||||
@@ -28,6 +30,8 @@ public class FakeLogger : ILogger
|
||||
/// <param name="value">The value associated with the property. Can be null.</param>
|
||||
/// <param name="destructureObjects">Indicates whether complex objects should be destructured. Defaults to false.</param>
|
||||
/// <returns>The current <see cref="ILogger"/> instance.</returns>
|
||||
/// <!-- aidoc-review:v1 severity=high kind=wrong_summary
|
||||
/// "The summary states the method 'Creates a logger context enriched with the specified property and value', but the implementation simply returns `this` without doing any enrichment or context creation. The `propertyName`, `value`, and `destructureObjects` parameters are completely ignored." -->
|
||||
public ILogger ForContext(string propertyName, object? value, bool destructureObjects = false)
|
||||
{
|
||||
return this;
|
||||
@@ -38,6 +42,7 @@ public class FakeLogger : ILogger
|
||||
/// </summary>
|
||||
/// <typeparam name="TSource">The source type used to enrich the logger context.</typeparam>
|
||||
/// <returns>The current <see cref="ILogger"/> instance.</returns>
|
||||
/// <!-- aidoc:v1 sig=11a41bb body=62e89c5 -->
|
||||
public ILogger ForContext<TSource>()
|
||||
{
|
||||
return this;
|
||||
@@ -48,6 +53,7 @@ public class FakeLogger : ILogger
|
||||
/// </summary>
|
||||
/// <param name="source">The source type used to enrich the logger context.</param>
|
||||
/// <returns>The current <see cref="ILogger"/> instance.</returns>
|
||||
/// <!-- aidoc:v1 sig=b6256d2 body=62e89c5 -->
|
||||
public ILogger ForContext(Type source)
|
||||
{
|
||||
return this;
|
||||
@@ -57,6 +63,7 @@ public class FakeLogger : ILogger
|
||||
/// Appends the rendered message of the provided log event to the internal messages collection.
|
||||
/// </summary>
|
||||
/// <param name="logEvent">The log event whose rendered message will be added to the collection.</param>
|
||||
/// <!-- aidoc:v1 sig=e35d092 body=03b8903 -->
|
||||
public void Write(LogEvent logEvent)
|
||||
{
|
||||
Messages.Add(logEvent.RenderMessage());
|
||||
@@ -68,6 +75,7 @@ public class FakeLogger : ILogger
|
||||
/// <param name="level">The severity level of the log event.</param>
|
||||
/// <param name="messageTemplate">The message template containing placeholders for the property values.</param>
|
||||
/// <param name="propertyValues">An optional array of objects to format the message template. Can be <see langword="null"/>.</param>
|
||||
/// <!-- aidoc:v1 sig=c2fa9db body=991505c -->
|
||||
public void Write(LogEventLevel level, string messageTemplate, params object?[]? propertyValues)
|
||||
{
|
||||
// Manejar la situación donde propertyValues es nulo, si es necesario
|
||||
@@ -84,6 +92,7 @@ public class FakeLogger : ILogger
|
||||
/// <param name="level">The log event level associated with the entry being written.</param>
|
||||
/// <param name="messageTemplate">The message template containing a format placeholder for the property value.</param>
|
||||
/// <param name="propertyValue">The value to be inserted into the message template.</param>
|
||||
/// <!-- aidoc:v1 sig=f334e80 body=d9646d0 -->
|
||||
public void Write<T>(LogEventLevel level, string messageTemplate, T propertyValue)
|
||||
{
|
||||
Messages.Add(string.Format(messageTemplate, propertyValue));
|
||||
@@ -99,6 +108,7 @@ public class FakeLogger : ILogger
|
||||
/// <param name="exception">An optional exception whose message is recorded when not null.</param>
|
||||
/// <param name="messageTemplate">The message template to log, used directly when <paramref name="propertyValues"/> is null.</param>
|
||||
/// <param name="propertyValues">Optional values to substitute into <paramref name="messageTemplate"/> via <c>string.Format</c>.</param>
|
||||
/// <!-- aidoc:v1 sig=e067f48 body=cc5019f -->
|
||||
public void Write(LogEventLevel level, Exception? exception, string messageTemplate,
|
||||
params object?[]? propertyValues)
|
||||
{
|
||||
@@ -113,6 +123,7 @@ public class FakeLogger : ILogger
|
||||
/// </summary>
|
||||
/// <param name="level">The log event level to evaluate.</param>
|
||||
/// <returns><c>true</c> if logging is enabled for the given level; otherwise, <c>false</c>.</returns>
|
||||
/// <!-- aidoc:v1 sig=2702665 body=eb3da57 -->
|
||||
public bool IsEnabled(LogEventLevel level)
|
||||
{
|
||||
return true;
|
||||
@@ -125,6 +136,7 @@ public class FakeLogger : ILogger
|
||||
/// <param name="exception">An optional exception whose message, when not null, is added to the Messages collection after the formatted message.</param>
|
||||
/// <param name="messageTemplate">The message template string used to format the log entry.</param>
|
||||
/// <param name="propertyValue">The value to be substituted into the message template.</param>
|
||||
/// <!-- aidoc:v1 sig=b73f265 body=2727c3a -->
|
||||
public void Write<T>(LogEventLevel level, Exception? exception, string messageTemplate, T propertyValue)
|
||||
{
|
||||
Messages.Add(string.Format(messageTemplate, propertyValue));
|
||||
|
||||
@@ -22,6 +22,7 @@ public class SubscriberGroupedTest
|
||||
/// <see cref="WsSubscriberGrouped"/> instances configured for two distinct patients with shift- and
|
||||
/// hour-based regularities and last/last-filled result mappings.
|
||||
/// </summary>
|
||||
/// <!-- aidoc:v1 sig=dee8bf2 body=c105125 -->
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
@@ -108,6 +109,7 @@ public class SubscriberGroupedTest
|
||||
/// Verifies that the <see cref="ISubscriberGroupedService.GetGrouped"/> method returns the list of grouped subscribers provided by the mocked service.
|
||||
/// Ensures the service correctly returns the expected collection of <see cref="WsSubscriberGrouped"/> items without modification.
|
||||
/// </summary>
|
||||
/// <!-- aidoc:v1 sig=861df1c body=dcd5b93 -->
|
||||
[Test]
|
||||
public void GetGroupeds_ReturnsExpectedResult()
|
||||
{
|
||||
@@ -129,6 +131,7 @@ public class SubscriberGroupedTest
|
||||
/// <summary>
|
||||
/// Verifies the behavior of the <c>Compare</c> extension method by asserting that it returns <c>true</c> when the gender and patient identifiers match the active context, and <c>false</c> when they do not, covering both the primary and secondary contexts.
|
||||
/// </summary>
|
||||
/// <!-- aidoc:v1 sig=56cc31f body=8311fa7 -->
|
||||
[Test]
|
||||
public void Compare_ExtensionResult()
|
||||
{
|
||||
@@ -144,6 +147,7 @@ public class SubscriberGroupedTest
|
||||
/// <summary>
|
||||
/// Verifies that a new patient observation is considered relevant for its group when it is the first observation recorded within the current hour.
|
||||
/// </summary>
|
||||
/// <!-- aidoc:v1 sig=a709b13 body=23c06ac -->
|
||||
[Test]
|
||||
public void Observation_is_rrelevant_because_is_the_first_in_hour()
|
||||
{
|
||||
@@ -160,6 +164,7 @@ public class SubscriberGroupedTest
|
||||
/// <summary>
|
||||
/// Verifies that a new patient observation is considered relevant for a grouped observation when an observation already exists within the configured hour interval and the grouping uses the Max result.
|
||||
/// </summary>
|
||||
/// <!-- aidoc:v1 sig=1d23e43 body=67f556f -->
|
||||
[Test]
|
||||
public void Grouped_Observation_Already_Observations_In_Hour_Should_Be_Relevant_By_Max_Result()
|
||||
{
|
||||
@@ -212,6 +217,7 @@ public class SubscriberGroupedTest
|
||||
/// <summary>
|
||||
/// Verifies that a new observation is considered not relevant for a grouped observation when the grouping rule is set to "Max", the regularity is "Hour", an observation already exists within the same hour, and the new observation's value does not exceed the existing maximum value.
|
||||
/// </summary>
|
||||
/// <!-- aidoc:v1 sig=f303af5 body=ff99dd7 -->
|
||||
[Test]
|
||||
public void Grouped_Observation_Already_Observations_In_Hour_Should_Be_IRelevant_By_Max_Result()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user