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