anchor.diff:      function  MakeSUT : ILogger; override;
     published
       procedure TestAddOutput;
  +    procedure TestAllowedItems;
  +    procedure TestEnabled;
       procedure TestEnterSection;
       procedure TestEnterSection1;
       procedure TestEnterSectionFmt;
  
positive.code:   end;
  end;
  
  procedure TestTLogger.TestEnterSection;
  const
    STR_MSG = '<TestEnterSection>';
  
negative.code:   Msg: string;
    Severity: TLogMsgSeverity;
  begin
    Msg := 'TestLog';
    Severity := SEVERITY_MIN;
  
    { Case #1 }
  
    SUT.Log(Severity, Msg);
  
    CheckEquals(1, FOutput.WrittenLinesCount, '(WrittenLinesCount = 1)::<Case #1>');
    CheckTrue(FOutput.LastWrittenLine.Contains(Msg), 'CheckTrue::LastWrittenLine.Contains(Msg)');
  
    { Case #2 }
  
    SUT.SeverityThreshold := SEVERITY_MAX;
    SUT.Log(Severity, Msg);
  
    CheckEquals(1, FOutput.WrittenLinesCount, '(WrittenLinesCount = 1)::<Case #2>');
  
    { Case #3 }
  
    SUT.SeverityThreshold := SEVERITY_NONE;
    SUT.Log(Severity, Msg);
  
    CheckEquals(1, FOutput.WrittenLinesCount, '(WrittenLinesCount = 1)::<Case #3>');
  end;
  
  procedure TestTLogger.TestLog1;
  const
    STR_VAL = String('<TestLog1>');
    INT_VAL = Integer(777);
  var
    Severity: TLogMsgSeverity;
  begin
    Severity := SEVERITY_MIN;
  
    { Case #1 }
  
    SUT.Log(Severity, [STR_VAL, INT_VAL]);
  
    CheckEquals(1, FOutput.WrittenLinesCount, '(WrittenLinesCount = 1)::<Case #1>');
    CheckTrue(FOutput.LastWrittenLine.Contains(STR_VAL), 'CheckTrue::LastWrittenLine.Contains(STR_VAL)');
    CheckTrue(FOutput.LastWrittenLine.Contains(INT_VAL.ToString), 'CheckTrue::LastWrittenLine.Contains(INT_VAL)');
  
    { Case #2 }
  
    SUT.SeverityThreshold := SEVERITY_MAX;
    SUT.Log(Severity, [STR_VAL, INT_VAL]);
  
    CheckEquals(1, FOutput.WrittenLinesCount, '(WrittenLinesCount = 1)::<Case #2>');
  
    { Case #3 }
  
    SUT.SeverityThreshold := SEVERITY_NONE;
    SUT.Log(Severity, [STR_VAL, INT_VAL]);
  
    CheckEquals(1, FOutput.WrittenLinesCount, '(WrittenLinesCount = 1)::<Case #3>');
  end;
  
  procedure TestTLogger.TestLogFmt;
  const
    FMT_MSG = 'Message with string arg "%s" and integer arg "%d".';
    STR_VAL = String('<TestLogFmt>');
    INT_VAL = Integer(777);
  var
    Msg: String;
    Severity: TLogMsgSeverity;
  begin
    Msg := FMT_MSG;
    Severity := SEVERITY_MIN;
  
    { Case #1 }
  
    SUT.LogFmt(Severity, Msg, [STR_VAL, INT_VAL]);
  
    CheckEquals(1, FOutput.WrittenLinesCount, '(WrittenLinesCount = 1)::<Case #1>');
    CheckTrue(FOutput.LastWrittenLine.Contains(STR_VAL), 'CheckTrue::LastWrittenLine.Contains(STR_VAL)');
    CheckTrue(FOutput.LastWrittenLine.Contains(INT_VAL.ToString), 'CheckTrue::LastWrittenLine.Contains(INT_VAL)');
  
    { Case #2 }
  
    SUT.SeverityThreshold := SEVERITY_MAX;
    SUT.LogFmt(Severity, Msg, [STR_VAL, INT_VAL]);
  
    CheckEquals(1, FOutput.WrittenLinesCount, '(WrittenLinesCount = 1)::<Case #2>');
  
    { Case #3 }
  
    SUT.SeverityThreshold := SEVERITY_NONE;
    SUT.LogFmt(Severity, Msg, [STR_VAL, INT_VAL]);
  
    CheckEquals(1, FOutput.WrittenLinesCount, '(WrittenLinesCount = 1)::<Case #3>');
  end;
  
  procedure TestTLogger.TestLogVal;
  const
    STR_VAL = String('<TestLogVal>');
    INT_VAL = Integer(777);
  var
    Severity: TLogMsgSeverity;
  begin
    Severity := SEVERITY_MIN;
  
    { Case #1 }
  
    SUT.LogVal(Severity, [STR_VAL, INT_VAL, Self]);
  
    CheckEquals(1, FOutput.WrittenLinesCount, '(WrittenLinesCount = 1)::<Case #1>');
    CheckTrue(FOutput.LastWrittenLine.Contains(STR_VAL), 'CheckTrue::LastWrittenLine.Contains(STR_VAL)');
    CheckTrue(FOutput.LastWrittenLine.Contains(INT_VAL.ToString), 'CheckTrue::LastWrittenLine.Contains(INT_VAL)');
    CheckTrue(FOutput.LastWrittenLine.Contains(Self.ToString), 'CheckTrue::LastWrittenLine.Contains(Self)');
  
    { Case #2 }
  
    SUT.SeverityThreshold := SEVERITY_MAX;
    SUT.LogVal(Severity, [STR_VAL, INT_VAL, Self]);
  
    CheckEquals(1, FOutput.WrittenLinesCount, '(WrittenLinesCount = 1)::<Case #2>');
  
    { Case #3 }
  
    SUT.SeverityThreshold := SEVERITY_NONE;
    SUT.LogVal(Severity, [STR_VAL, INT_VAL, Self]);
  
    CheckEquals(1, FOutput.WrittenLinesCount, '(WrittenLinesCount = 1)::<Case #3>');
  end;
  
  procedure TestTLogger.TestDebug;
  