Skip to content

Commit

Permalink
Experiment
Browse files Browse the repository at this point in the history
  • Loading branch information
sandrohanea committed Dec 20, 2024
1 parent 74ae9a6 commit dfa80bd
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions tests/Whisper.net.Tests/FactoryTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,31 @@
using FluentAssertions;
using Whisper.net.Logger;
using Xunit;
using Xunit.Abstractions;

namespace Whisper.net.Tests;

public class FactoryTests : IClassFixture<TinyModelFixture>
public class FactoryTests : IClassFixture<TinyModelFixture>, IDisposable
{
private readonly TinyModelFixture model;
private readonly ITestOutputHelper output;

public FactoryTests(TinyModelFixture model)
public FactoryTests(TinyModelFixture model, ITestOutputHelper output)
{
LogProvider.AddConsoleLogging(minLevel: WhisperLogLevel.Debug);
LogProvider.Instance.OnLog += Instance_OnLog;
this.model = model;
this.output = output;
}

public void Dispose()
{
LogProvider.Instance.OnLog -= Instance_OnLog;
}

private void Instance_OnLog(WhisperLogLevel arg1, string? arg2)
{
output.WriteLine($"[Whisper.net] {arg1}: {arg2}");
}

[Fact]
Expand Down

0 comments on commit dfa80bd

Please sign in to comment.