mirror of
https://github.com/AlexMacocian/SystemExtensions.git
synced 2026-07-15 14:19:29 +00:00
e6a06915cd
Codestyle fixes Setup CODEOWNERS Setup dependabot
30 lines
610 B
C#
30 lines
610 B
C#
using FluentAssertions;
|
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|
using System;
|
|
using System.Logging;
|
|
|
|
namespace SystemExtensions.DependencyInjection.Tests.Logging;
|
|
|
|
[TestClass]
|
|
public class DebugLogsWriterTests
|
|
{
|
|
private readonly DebugLogsWriter logsWriter = new();
|
|
|
|
[TestMethod]
|
|
public void WriteLog_Succeeds()
|
|
{
|
|
this.logsWriter.WriteLog(new Log());
|
|
}
|
|
|
|
[TestMethod]
|
|
public void WriteNullLog_Throws()
|
|
{
|
|
Action action = new(() =>
|
|
{
|
|
this.logsWriter.WriteLog(null);
|
|
});
|
|
|
|
action.Should().Throw<Exception>();
|
|
}
|
|
}
|