2
0
mirror of synced 2025-02-05 05:04:17 +00:00

30 lines
689 B
C#
Raw Normal View History

2023-09-20 10:51:47 +02:00
using Logging;
namespace DistTestCore.Logs
2023-09-12 11:25:04 +02:00
{
public abstract class BaseTestLog : BaseLog
{
private bool hasFailed;
private readonly string deployId;
protected BaseTestLog(string deployId)
{
this.deployId = deployId;
}
2023-09-12 11:25:04 +02:00
2023-09-20 10:51:47 +02:00
public void WriteLogTag()
{
var category = NameUtils.GetCategoryName();
var name = NameUtils.GetTestMethodName();
LogFile.WriteRaw($"{deployId} {category} {name}");
2023-09-20 10:51:47 +02:00
}
2023-09-12 11:25:04 +02:00
public void MarkAsFailed()
{
if (hasFailed) return;
hasFailed = true;
LogFile.ConcatToFilename("_FAILED");
}
}
}