mirror of
https://github.com/AlexMacocian/WpfExtended.git
synced 2026-07-24 03:56:28 +00:00
7e9c3c5f64
* Create unit tests Rearrange test project structure Implement ICVLoggerProvider interface for mocking/extensibility * Fix UTs project path
32 lines
694 B
C#
32 lines
694 B
C#
using FluentAssertions;
|
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|
using System;
|
|
using WpfExtended.Logging;
|
|
using WpfExtended.Models;
|
|
|
|
namespace WpfExtended.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>();
|
|
}
|
|
}
|
|
}
|