Removed unit test

This commit is contained in:
Holger Börchers 2019-07-28 14:20:32 +02:00
parent 93f1a7ab63
commit 3a45db0d77
5 changed files with 10 additions and 66 deletions

View File

@ -1,16 +0,0 @@
using SmallInjectorDemo;
using Xunit;
namespace InjectorTest
{
public class HelperTest
{
[Fact]
public void Test()
{
const string expected = "[-] HelperTest.Test Id: ";
var actual = Helper.WriteMethodString(new TestClock(), "");
Assert.Equal(expected, actual);
}
}
}

View File

@ -1,24 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<IsPackable>false</IsPackable>
<LangVersion>7.1</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SmallInjectorDemo\SmallInjectorDemo.csproj" />
</ItemGroup>
</Project>

View File

@ -1,9 +0,0 @@
using SmallInjectorDemo;
namespace InjectorTest
{
public class TestClock : IClock
{
public string CurrentDateTime => "-";
}
}

View File

@ -1,13 +1,11 @@
 
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15 # Visual Studio Version 16
VisualStudioVersion = 15.0.26124.0 VisualStudioVersion = 16.0.29123.88
MinimumVisualStudioVersion = 15.0.26124.0 MinimumVisualStudioVersion = 15.0.26124.0
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SmallInjectorDemo", "SmallInjectorDemo\SmallInjectorDemo.csproj", "{620CC001-7DF9-4233-AFC2-187FD9144835}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SmallInjectorDemo", "SmallInjectorDemo\SmallInjectorDemo.csproj", "{620CC001-7DF9-4233-AFC2-187FD9144835}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "InjectorTest", "InjectorTest\InjectorTest.csproj", "{0648782E-EB73-4326-9471-CE386C1FBC4D}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SmallInjector", "SmallInjector\SmallInjector.csproj", "{8D52C856-A71D-4C50-832B-8679CDD030B4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SmallInjector", "SmallInjector\SmallInjector.csproj", "{8D52C856-A71D-4C50-832B-8679CDD030B4}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -31,18 +29,6 @@ Global
{620CC001-7DF9-4233-AFC2-187FD9144835}.Release|x64.Build.0 = Release|Any CPU {620CC001-7DF9-4233-AFC2-187FD9144835}.Release|x64.Build.0 = Release|Any CPU
{620CC001-7DF9-4233-AFC2-187FD9144835}.Release|x86.ActiveCfg = Release|Any CPU {620CC001-7DF9-4233-AFC2-187FD9144835}.Release|x86.ActiveCfg = Release|Any CPU
{620CC001-7DF9-4233-AFC2-187FD9144835}.Release|x86.Build.0 = Release|Any CPU {620CC001-7DF9-4233-AFC2-187FD9144835}.Release|x86.Build.0 = Release|Any CPU
{0648782E-EB73-4326-9471-CE386C1FBC4D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0648782E-EB73-4326-9471-CE386C1FBC4D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0648782E-EB73-4326-9471-CE386C1FBC4D}.Debug|x64.ActiveCfg = Debug|Any CPU
{0648782E-EB73-4326-9471-CE386C1FBC4D}.Debug|x64.Build.0 = Debug|Any CPU
{0648782E-EB73-4326-9471-CE386C1FBC4D}.Debug|x86.ActiveCfg = Debug|Any CPU
{0648782E-EB73-4326-9471-CE386C1FBC4D}.Debug|x86.Build.0 = Debug|Any CPU
{0648782E-EB73-4326-9471-CE386C1FBC4D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0648782E-EB73-4326-9471-CE386C1FBC4D}.Release|Any CPU.Build.0 = Release|Any CPU
{0648782E-EB73-4326-9471-CE386C1FBC4D}.Release|x64.ActiveCfg = Release|Any CPU
{0648782E-EB73-4326-9471-CE386C1FBC4D}.Release|x64.Build.0 = Release|Any CPU
{0648782E-EB73-4326-9471-CE386C1FBC4D}.Release|x86.ActiveCfg = Release|Any CPU
{0648782E-EB73-4326-9471-CE386C1FBC4D}.Release|x86.Build.0 = Release|Any CPU
{8D52C856-A71D-4C50-832B-8679CDD030B4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8D52C856-A71D-4C50-832B-8679CDD030B4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8D52C856-A71D-4C50-832B-8679CDD030B4}.Debug|Any CPU.Build.0 = Debug|Any CPU {8D52C856-A71D-4C50-832B-8679CDD030B4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8D52C856-A71D-4C50-832B-8679CDD030B4}.Debug|x64.ActiveCfg = Debug|Any CPU {8D52C856-A71D-4C50-832B-8679CDD030B4}.Debug|x64.ActiveCfg = Debug|Any CPU

View File

@ -19,6 +19,13 @@ namespace SmallInjectorDemo
Console.WriteLine("Register " + nameof(ServiceConsumer)); Console.WriteLine("Register " + nameof(ServiceConsumer));
container.RegisterType<ServiceConsumer>(false); container.RegisterType<ServiceConsumer>(false);
Console.WriteLine();
Console.WriteLine("Check registrations:");
Console.WriteLine(nameof(IClock).PadRight(20) + container.IsRegistered<IClock>());
Console.WriteLine(nameof(IServiceOne).PadRight(20) + container.IsRegistered<IServiceOne>());
Console.WriteLine(nameof(IServiceTwo).PadRight(20) + container.IsRegistered<IServiceTwo>());
Console.WriteLine(nameof(ServiceConsumer).PadRight(20) + container.IsRegistered<ServiceConsumer>());
Console.WriteLine(); Console.WriteLine();
Console.WriteLine("Resolve class instances:"); Console.WriteLine("Resolve class instances:");
var useful1 = container.Resolve<ServiceConsumer>(); var useful1 = container.Resolve<ServiceConsumer>();