public void FormatCustomTokenFunction() { CustomLogEntry entry = new CustomLogEntry(); ILogFormatter formatter = new CustomTextFormatter("Acme custom token template: [[AcmeDBLookup{value1}]]"); string actual = formatter.Format(entry); string expected = "Acme custom token template: 1234"; Assert.AreEqual(expected, actual); }
public void FormatCustomTokenFunction() { CustomLogEntry entry = new CustomLogEntry(); CustomTextFormatterData data = new CustomTextFormatterData(); data.Template.Value = "Acme custom token template: [[AcmeDBLookup{value1}]]"; ILogFormatter formatter = new CustomTextFormatter(data); string actual = formatter.Format(entry); string expected = "Acme custom token template: 1234"; Assert.AreEqual(expected, actual); }