tests agian
This commit is contained in:
parent
becac42720
commit
15a9ba0dde
15
franz.tests/UnitTest1.cs
Normal file
15
franz.tests/UnitTest1.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using franz;
|
||||
using System;
|
||||
using Xunit;
|
||||
|
||||
namespace franz.tests
|
||||
{
|
||||
public class UnitTest1
|
||||
{
|
||||
[Fact]
|
||||
public void Test1()
|
||||
{
|
||||
Telefranz.Configure("xunit", "focalor:9092");
|
||||
}
|
||||
}
|
||||
}
|
23
franz.tests/franz.tests.csproj
Normal file
23
franz.tests/franz.tests.csproj
Normal file
@ -0,0 +1,23 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="../franz/franz.csproj" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
|
||||
<PackageReference Include="xunit" Version="2.4.1" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="coverlet.collector" Version="1.3.0">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
@ -1,10 +1,26 @@
|
||||
|
||||
using System;
|
||||
using Kafka.Public;
|
||||
using Kafka.Public.Loggers;
|
||||
|
||||
namespace franz
|
||||
{
|
||||
internal class quieterLogger : ConsoleLogger
|
||||
internal class quieterLogger : ILogger
|
||||
{
|
||||
new public void LogInformation(string message) {}
|
||||
public void LogDebug(string message)
|
||||
{
|
||||
Console.WriteLine($"[{DateTime.Now}] [DEBUG]: {message}");
|
||||
}
|
||||
public void LogError(string message)
|
||||
{
|
||||
Console.Error.WriteLine($"[{DateTime.Now}] [ERROR]: {message}");
|
||||
}
|
||||
public void LogInformation(string message)
|
||||
{
|
||||
//Console.WriteLine($"[INFO]: {message}");
|
||||
}
|
||||
public void LogWarning(string message)
|
||||
{
|
||||
Console.WriteLine($"[{DateTime.Now}] [Warning]: {message}");
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user