2023-07-18 09:02:41 +02:00
|
|
|
|
namespace Logging
|
2023-04-14 14:53:39 +02:00
|
|
|
|
{
|
|
|
|
|
public class FixtureLog : BaseLog
|
|
|
|
|
{
|
|
|
|
|
private readonly string fullName;
|
2023-04-25 11:31:15 +02:00
|
|
|
|
private readonly LogConfig config;
|
2023-04-14 14:53:39 +02:00
|
|
|
|
|
2023-07-18 09:02:41 +02:00
|
|
|
|
public FixtureLog(LogConfig config, DateTime start, string name = "")
|
2023-04-25 11:31:15 +02:00
|
|
|
|
: base(config.DebugEnabled)
|
2023-04-14 14:53:39 +02:00
|
|
|
|
{
|
2023-07-18 09:02:41 +02:00
|
|
|
|
fullName = NameUtils.GetFixtureFullName(config, start, name);
|
2023-04-25 11:31:15 +02:00
|
|
|
|
this.config = config;
|
2023-04-14 14:53:39 +02:00
|
|
|
|
}
|
|
|
|
|
|
2023-06-21 10:06:54 +02:00
|
|
|
|
public TestLog CreateTestLog(string name = "")
|
2023-04-14 14:53:39 +02:00
|
|
|
|
{
|
2023-06-21 10:06:54 +02:00
|
|
|
|
return new TestLog(fullName, config.DebugEnabled, name);
|
2023-04-14 14:53:39 +02:00
|
|
|
|
}
|
|
|
|
|
|
2023-06-21 11:01:48 +02:00
|
|
|
|
public void DeleteFolder()
|
|
|
|
|
{
|
|
|
|
|
Directory.Delete(fullName, true);
|
|
|
|
|
}
|
|
|
|
|
|
2023-06-28 15:11:20 +02:00
|
|
|
|
protected override string GetFullName()
|
2023-04-14 14:53:39 +02:00
|
|
|
|
{
|
2023-06-28 15:11:20 +02:00
|
|
|
|
return fullName;
|
2023-04-14 14:53:39 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|