Removed unit test
This commit is contained in:
parent
93f1a7ab63
commit
3a45db0d77
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
@ -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>
|
@ -1,9 +0,0 @@
|
||||
using SmallInjectorDemo;
|
||||
|
||||
namespace InjectorTest
|
||||
{
|
||||
public class TestClock : IClock
|
||||
{
|
||||
public string CurrentDateTime => "-";
|
||||
}
|
||||
}
|
@ -1,13 +1,11 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.26124.0
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.29123.88
|
||||
MinimumVisualStudioVersion = 15.0.26124.0
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SmallInjectorDemo", "SmallInjectorDemo\SmallInjectorDemo.csproj", "{620CC001-7DF9-4233-AFC2-187FD9144835}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "InjectorTest", "InjectorTest\InjectorTest.csproj", "{0648782E-EB73-4326-9471-CE386C1FBC4D}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SmallInjector", "SmallInjector\SmallInjector.csproj", "{8D52C856-A71D-4C50-832B-8679CDD030B4}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SmallInjector", "SmallInjector\SmallInjector.csproj", "{8D52C856-A71D-4C50-832B-8679CDD030B4}"
|
||||
EndProject
|
||||
Global
|
||||
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|x86.ActiveCfg = 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.Build.0 = Debug|Any CPU
|
||||
{8D52C856-A71D-4C50-832B-8679CDD030B4}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
|
@ -19,6 +19,13 @@ namespace SmallInjectorDemo
|
||||
Console.WriteLine("Register " + nameof(ServiceConsumer));
|
||||
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("Resolve class instances:");
|
||||
var useful1 = container.Resolve<ServiceConsumer>();
|
||||
|
Loading…
x
Reference in New Issue
Block a user