From 660fdd69c93d47df67949ce5847dfd2ce48f7b10 Mon Sep 17 00:00:00 2001 From: Frederik Date: Thu, 27 May 2021 15:41:20 +0200 Subject: [PATCH 1/2] Changed target framework from .net framework to .net standard 2.0 Updated nuget packages to newest stable versions --- src/LightInject.xUnit.sln | 27 +- .../LightInject.xUnit2.Tests.csproj | 118 +-- src/LightInject.xUnit2/LightInject.xUnit2.cs | 2 +- .../LightInject.xUnit2.csproj | 99 +-- ...ightInject.xUnit2.Tests.csproj.DotSettings | 0 .../LightInject.xUnit2.Tests_2.csproj | 85 ++ ...tInject.xUnit2.Tests_2.csproj.DotSettings} | 0 .../Properties/AssemblyInfo.cs | 0 .../SampleServices/Bar.cs | 74 ++ .../SampleServices/Foo.cs | 829 ++++++++++++++++++ .../SampleServices/SampleService.cs | 6 + src/LightInject.xUnit2_2.Tests/xUnit2Tests.cs | 230 +++++ .../LightInject.xUnit2.cs | 238 +++++ .../LightInject.xUnit2.csproj.DotSettings | 2 + .../LightInject.xUnit2_2.csproj | 74 ++ .../NuGet/LightInject.Xunit2.Source.nuspec | 26 + .../NuGet/LightInject.Xunit2.nuspec | 20 + .../Properties/AssemblyInfo.cs | 0 .../project.json_ | 0 .../LightInject.xUnit2.Tests_2.csproj | 98 +++ .../NuGetUpgradeLog.html | 169 ++++ .../packages.config | 0 .../LightInject.xUnit2_2.csproj | 86 ++ .../LightInject.xUnit2_2/NuGetUpgradeLog.html | 165 ++++ .../LightInject.xUnit2_2}/packages.config | 0 25 files changed, 2161 insertions(+), 187 deletions(-) rename src/{LightInject.xUnit2.Tests => LightInject.xUnit2_2.Tests}/LightInject.xUnit2.Tests.csproj.DotSettings (100%) create mode 100644 src/LightInject.xUnit2_2.Tests/LightInject.xUnit2.Tests_2.csproj rename src/{LightInject.xUnit2/LightInject.xUnit2.csproj.DotSettings => LightInject.xUnit2_2.Tests/LightInject.xUnit2.Tests_2.csproj.DotSettings} (100%) rename src/{LightInject.xUnit2.Tests => LightInject.xUnit2_2.Tests}/Properties/AssemblyInfo.cs (100%) create mode 100644 src/LightInject.xUnit2_2.Tests/SampleServices/Bar.cs create mode 100644 src/LightInject.xUnit2_2.Tests/SampleServices/Foo.cs create mode 100644 src/LightInject.xUnit2_2.Tests/SampleServices/SampleService.cs create mode 100644 src/LightInject.xUnit2_2.Tests/xUnit2Tests.cs create mode 100644 src/LightInject.xUnit2_2/LightInject.xUnit2.cs create mode 100644 src/LightInject.xUnit2_2/LightInject.xUnit2.csproj.DotSettings create mode 100644 src/LightInject.xUnit2_2/LightInject.xUnit2_2.csproj create mode 100644 src/LightInject.xUnit2_2/NuGet/LightInject.Xunit2.Source.nuspec create mode 100644 src/LightInject.xUnit2_2/NuGet/LightInject.Xunit2.nuspec rename src/{LightInject.xUnit2 => LightInject.xUnit2_2}/Properties/AssemblyInfo.cs (100%) rename src/{LightInject.xUnit2 => LightInject.xUnit2_2}/project.json_ (100%) create mode 100644 src/MigrationBackup/b15c5e1f/LightInject.xUnit2.Tests_2/LightInject.xUnit2.Tests_2.csproj create mode 100644 src/MigrationBackup/b15c5e1f/LightInject.xUnit2.Tests_2/NuGetUpgradeLog.html rename src/{LightInject.xUnit2.Tests => MigrationBackup/b15c5e1f/LightInject.xUnit2.Tests_2}/packages.config (100%) create mode 100644 src/MigrationBackup/e0a97129/LightInject.xUnit2_2/LightInject.xUnit2_2.csproj create mode 100644 src/MigrationBackup/e0a97129/LightInject.xUnit2_2/NuGetUpgradeLog.html rename src/{LightInject.xUnit2 => MigrationBackup/e0a97129/LightInject.xUnit2_2}/packages.config (100%) diff --git a/src/LightInject.xUnit.sln b/src/LightInject.xUnit.sln index 1db6f8f..b990b21 100644 --- a/src/LightInject.xUnit.sln +++ b/src/LightInject.xUnit.sln @@ -1,11 +1,11 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.24720.0 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.31205.134 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LightInject.xUnit2", "LightInject.xUnit2\LightInject.xUnit2.csproj", "{245ABD3A-3FE2-480F-B4FF-6FC72AC11ACC}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LightInject.xUnit2", "LightInject.xUnit2\LightInject.xUnit2.csproj", "{EEA1E6AA-5139-4E48-8752-D61640676D1D}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LightInject.xUnit2.Tests", "LightInject.xUnit2.Tests\LightInject.xUnit2.Tests.csproj", "{633CEBA8-AE04-40C8-86B5-BC5DBE22D0A0}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LightInject.xUnit2.Tests", "LightInject.xUnit2.Tests\LightInject.xUnit2.Tests.csproj", "{0A37B8AD-8A2C-4CEA-ADFC-6BF4B40BA4DC}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -13,16 +13,19 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {245ABD3A-3FE2-480F-B4FF-6FC72AC11ACC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {245ABD3A-3FE2-480F-B4FF-6FC72AC11ACC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {245ABD3A-3FE2-480F-B4FF-6FC72AC11ACC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {245ABD3A-3FE2-480F-B4FF-6FC72AC11ACC}.Release|Any CPU.Build.0 = Release|Any CPU - {633CEBA8-AE04-40C8-86B5-BC5DBE22D0A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {633CEBA8-AE04-40C8-86B5-BC5DBE22D0A0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {633CEBA8-AE04-40C8-86B5-BC5DBE22D0A0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {633CEBA8-AE04-40C8-86B5-BC5DBE22D0A0}.Release|Any CPU.Build.0 = Release|Any CPU + {EEA1E6AA-5139-4E48-8752-D61640676D1D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EEA1E6AA-5139-4E48-8752-D61640676D1D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EEA1E6AA-5139-4E48-8752-D61640676D1D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EEA1E6AA-5139-4E48-8752-D61640676D1D}.Release|Any CPU.Build.0 = Release|Any CPU + {0A37B8AD-8A2C-4CEA-ADFC-6BF4B40BA4DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0A37B8AD-8A2C-4CEA-ADFC-6BF4B40BA4DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0A37B8AD-8A2C-4CEA-ADFC-6BF4B40BA4DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0A37B8AD-8A2C-4CEA-ADFC-6BF4B40BA4DC}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {6E919CE6-7482-4E6C-AF09-305BFB6A221E} + EndGlobalSection EndGlobal diff --git a/src/LightInject.xUnit2.Tests/LightInject.xUnit2.Tests.csproj b/src/LightInject.xUnit2.Tests/LightInject.xUnit2.Tests.csproj index 2c72de9..36ee5a5 100644 --- a/src/LightInject.xUnit2.Tests/LightInject.xUnit2.Tests.csproj +++ b/src/LightInject.xUnit2.Tests/LightInject.xUnit2.Tests.csproj @@ -1,98 +1,32 @@ - - - - + + - Debug - AnyCPU - {633CEBA8-AE04-40C8-86B5-BC5DBE22D0A0} - Library - Properties - LightInject.xUnit2.Tests - LightInject.xUnit2.Tests - v4.6 - 512 - - + netcoreapp3.1 + + false - - true - full - false - bin\Debug\ - TRACE;DEBUG;NET46 - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE;NET46 - prompt - 4 - - - - ..\packages\LightInject.5.0.0\lib\net46\LightInject.dll - True - - - - - - - - - - - ..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll - True - - - ..\packages\xunit.assert.2.1.0\lib\dotnet\xunit.assert.dll - True - - - ..\packages\xunit.extensibility.core.2.1.0\lib\dotnet\xunit.core.dll - True - - - ..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll - True - - - - - - - - - - - - + - - {245abd3a-3fe2-480f-b4ff-6fc72ac11acc} - LightInject.xUnit2 - + + + 1.0.0 + + + 6.4.0 + + + 4.8.9 + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + - + - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - \ No newline at end of file + + + diff --git a/src/LightInject.xUnit2/LightInject.xUnit2.cs b/src/LightInject.xUnit2/LightInject.xUnit2.cs index 7aec0e7..fc2cc4e 100644 --- a/src/LightInject.xUnit2/LightInject.xUnit2.cs +++ b/src/LightInject.xUnit2/LightInject.xUnit2.cs @@ -116,7 +116,7 @@ public override IEnumerable GetData(MethodInfo methodUnderTest) /// /// This method is only executed when the test app domains are unloaded. /// - [ExcludeFromCodeCoverage] + [System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] private static void EndAllScopes() { foreach (var container in Containers.Values) diff --git a/src/LightInject.xUnit2/LightInject.xUnit2.csproj b/src/LightInject.xUnit2/LightInject.xUnit2.csproj index 4481261..ae2cf9f 100644 --- a/src/LightInject.xUnit2/LightInject.xUnit2.csproj +++ b/src/LightInject.xUnit2/LightInject.xUnit2.csproj @@ -1,86 +1,21 @@ - - - + + - Debug - AnyCPU - {245ABD3A-3FE2-480F-B4FF-6FC72AC11ACC} - Library - Properties - LightInject.xUnit2 - LightInject.xUnit2 - v4.6 - 512 + netstandard2.0 - - true - full - false - bin\Debug\ - TRACE;DEBUG;NET46 - prompt - 4 - bin\Debug\LightInject.xUnit2.XML - - - pdbonly - true - bin\Release\ - TRACE;NET46 - prompt - 4 - bin\Release\LightInject.xUnit2.XML - true - - - - ..\packages\LightInject.5.0.0\lib\net46\LightInject.dll - True - - - - - - - - - - - ..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll - False - True - - - ..\packages\xunit.extensibility.core.2.1.0\lib\dotnet\xunit.core.dll - False - True - - - ..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll - False - True - - - - - - - - - - - + - - - + + 6.4.0 + + + 1.1.118 + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + 2.4.1 + - - - \ No newline at end of file + + diff --git a/src/LightInject.xUnit2.Tests/LightInject.xUnit2.Tests.csproj.DotSettings b/src/LightInject.xUnit2_2.Tests/LightInject.xUnit2.Tests.csproj.DotSettings similarity index 100% rename from src/LightInject.xUnit2.Tests/LightInject.xUnit2.Tests.csproj.DotSettings rename to src/LightInject.xUnit2_2.Tests/LightInject.xUnit2.Tests.csproj.DotSettings diff --git a/src/LightInject.xUnit2_2.Tests/LightInject.xUnit2.Tests_2.csproj b/src/LightInject.xUnit2_2.Tests/LightInject.xUnit2.Tests_2.csproj new file mode 100644 index 0000000..0c6f368 --- /dev/null +++ b/src/LightInject.xUnit2_2.Tests/LightInject.xUnit2.Tests_2.csproj @@ -0,0 +1,85 @@ + + + + + Debug + AnyCPU + {633CEBA8-AE04-40C8-86B5-BC5DBE22D0A0} + Library + Properties + LightInject.xUnit2.Tests + LightInject.xUnit2.Tests + v4.6 + 512 + + + + + true + full + false + bin\Debug\ + TRACE;DEBUG;NET46 + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE;NET46 + prompt + 4 + + + + + + + + + + + + + + + + + + + + + {245abd3a-3fe2-480f-b4ff-6fc72ac11acc} + LightInject.xUnit2_2 + + + + + + + + 1.0.0 + + + 5.0.0 + + + 2.3.5 + + + 2.1.0 + + + 2.1.0 + + + + + \ No newline at end of file diff --git a/src/LightInject.xUnit2/LightInject.xUnit2.csproj.DotSettings b/src/LightInject.xUnit2_2.Tests/LightInject.xUnit2.Tests_2.csproj.DotSettings similarity index 100% rename from src/LightInject.xUnit2/LightInject.xUnit2.csproj.DotSettings rename to src/LightInject.xUnit2_2.Tests/LightInject.xUnit2.Tests_2.csproj.DotSettings diff --git a/src/LightInject.xUnit2.Tests/Properties/AssemblyInfo.cs b/src/LightInject.xUnit2_2.Tests/Properties/AssemblyInfo.cs similarity index 100% rename from src/LightInject.xUnit2.Tests/Properties/AssemblyInfo.cs rename to src/LightInject.xUnit2_2.Tests/Properties/AssemblyInfo.cs diff --git a/src/LightInject.xUnit2_2.Tests/SampleServices/Bar.cs b/src/LightInject.xUnit2_2.Tests/SampleServices/Bar.cs new file mode 100644 index 0000000..3e9f8ab --- /dev/null +++ b/src/LightInject.xUnit2_2.Tests/SampleServices/Bar.cs @@ -0,0 +1,74 @@ +using System; + +namespace LightInject.SampleLibrary +{ + public class FooWithStaticConstructor + { + private FooWithStaticConstructor() + { + } + + static FooWithStaticConstructor() + { + + } + } + + public class FooWithPrivateConstructor + { + private FooWithPrivateConstructor() + { + } + } + + + public interface IBar + { + } + + public class Bar : IBar + { + [ThreadStatic] + public static int InitializeCount = 0; + + public Bar() + { + InitializeCount++; + } + } + + public class BarMock : IBar + { + + } + + + public interface IBar { } + + public class Bar : IBar { } + + public class BarWithFooDependency : IBar + { + public IFoo Foo { get; private set; } + + public BarWithFooDependency(IFoo foo) + { + Foo = foo; + } + } + + + public class AnotherBar : IBar + { + } + + public class BrokenBar : IBar + { + public BrokenBar() + { + throw new BrokenBarException(); + } + } + + public class BrokenBarException : Exception { } +} \ No newline at end of file diff --git a/src/LightInject.xUnit2_2.Tests/SampleServices/Foo.cs b/src/LightInject.xUnit2_2.Tests/SampleServices/Foo.cs new file mode 100644 index 0000000..f5044f1 --- /dev/null +++ b/src/LightInject.xUnit2_2.Tests/SampleServices/Foo.cs @@ -0,0 +1,829 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace LightInject.SampleLibrary +{ + using System.Diagnostics; + using System.Threading.Tasks; + + public interface IFooWithProperty + { + string Value { get; } + } + + public class FooWithProperty : IFooWithProperty + { + public string Value + { + get + { + return "SomeValue"; + } + } + } + + public class FooWithCompilerGeneratedType : IFoo + { + public Func SomeAction + { + get + { + string someString = "Somestring"; + return () => someString; + } + } + + } + +#if NET45 || NET46 + + public interface IAsyncFoo + { + Task GetBar(); + } + + public class AsyncFoo : IAsyncFoo + { + private readonly Lazy lazyBar; + + public AsyncFoo(Lazy lazyBar) + { + this.lazyBar = lazyBar; + } + + public async Task GetBar() + { + await Task.Delay(10); + return lazyBar.Value; + } + + + } + +#endif + + public interface IFoo { } + + public class Foo : IFoo + { + public static int Instances { get; set; } + + public Foo() + { + Instances++; + } + } + + public class DerivedFoo : Foo + { + + } + + + public class FooWithStaticDependency : IFoo + { + public static IBar Bar { get; set; } + } + + public class FooMock : IFoo + { + + } + + public class FooMock : IFoo{} + + + public class AnotherFoo : IFoo { } + + public class FooWithDependency : IFoo + { + public FooWithDependency(IBar bar) + { + Bar = bar; + } + + public IBar Bar { get; private set; } + } + + public class AnotherFooWithDependency : IFoo + { + public AnotherFooWithDependency(IBar bar) + { + Bar = bar; + } + + public IBar Bar { get; private set; } + } + + + + + + public class FooWithEnumerableIFooDependency : IFoo + { + public IEnumerable FooList { get; private set; } + + public FooWithEnumerableIFooDependency(IEnumerable fooList) + { + FooList = fooList; + } + } + + public class FooWithEnumerableAndRegularDependency : IFoo + { + public IEnumerable Bars { get; private set; } + + public IBar Bar { get; private set; } + + public FooWithEnumerableAndRegularDependency(IEnumerable bars, IBar bar) + { + Bars = bars; + Bar = bar; + } + } + + public class FooWithStaticProperty : IFoo + { + public static IBar Bar { get; set; } + } + + + public class FooWithSameDependencyTwice : IFoo + { + private readonly IBar m_bar1; + + private readonly IBar m_bar2; + + public FooWithSameDependencyTwice(IBar bar1, IBar bar2) + { + m_bar1 = bar1; + m_bar2 = bar2; + } + + public IBar Bar2 + { + get + { + return this.m_bar2; + } + } + + public IBar Bar1 + { + get + { + return this.m_bar1; + } + } + } + + public class FooWithSampleServiceDependency : IFoo + { + public FooWithSampleServiceDependency(IBar bar, ISampleService sampleService) + { + SampleService = sampleService; + Bar = bar; + } + public ISampleService SampleService { get; private set; } + public IBar Bar { get; private set; } + } + + + public class BarWithSampleServiceDependency : IBar + { + public BarWithSampleServiceDependency(ISampleService sampleService) + { + SampleService = sampleService; + } + + public ISampleService SampleService { get; private set; } + } + + + + + public class FooWithSamePropertyDependencyTwice : IFoo + { + public IBar Bar1 { get; set; } + + public IBar Bar2 { get; set; } + } + + + public class FooDecorator : IFoo + { + public FooDecorator(IFoo foo) + { + } + } + + + public class ClosedGenericFooDecorator : IFoo + { + public ClosedGenericFooDecorator(IFoo foo) + { + } + } + + public class FooDecoratorWithTargetAsPropertyDependency : IFoo + { + public IFoo Foo { get; set; } + } + + + + public class AnotherFooDecorator : IFoo + { + public AnotherFooDecorator(IFoo foo) + { + } + } + + public class FooDecorator : IFoo + { + private readonly IFoo foo; + + public FooDecorator(IFoo foo) + { + this.foo = foo; + } + + public IFoo DecoratedInstance + { + get + { + return this.foo; + } + } + } + + public class BarDecorator : IBar + { + [ThreadStatic] + public static int Instances; + + public BarDecorator(IBar bar) + { + Instances++; + } + } + + + public class FooDecoratorWithDependency : IFoo + { + public FooDecoratorWithDependency(IFoo foo, IBar bar) + { + Foo = foo; + Bar = bar; + } + + public IFoo Foo { get; private set; } + + public IBar Bar { get; private set; } + } + + public class FooDecoratorWithDependencyFirst : IFoo + { + public FooDecoratorWithDependencyFirst(IBar bar, IFoo foo) + { + Foo = foo; + Bar = bar; + } + + public IFoo Foo { get; private set; } + + public IBar Bar { get; private set; } + } + + + public class AnotherFooDecorator : IFoo + { + private readonly IFoo foo; + + public AnotherFooDecorator(IFoo foo) + { + this.foo = foo; + } + + public IFoo DecoratedInstance + { + get + { + return this.foo; + } + } + } + + + + public class FooWithReferenceTypeDependency : IFoo + { + public FooWithReferenceTypeDependency(string value) + { + Value = value; + } + + public string Value { get; private set; } + } + + public class FooWithReferenceTypePropertyDependency : IFoo + { + public string Value { get; set; } + } + + public class FooWithValueTypeDependency : IFoo + { + public FooWithValueTypeDependency(int value) + { + Value = value; + } + + public int Value { get; private set; } + } + + public class FooWithOneParameter : IFoo + { + public int Arg1 { get; private set; } + + public FooWithOneParameter(int arg1) + { + Arg1 = arg1; + } + } + + public class FooWithTwoParameters : IFoo + { + public int Arg1 { get; private set; } + + public int Arg2 { get; private set; } + + public FooWithTwoParameters(int arg1, int arg2) + { + Arg1 = arg1; + Arg2 = arg2; + } + } + + public class FooWithThreeParameters : IFoo + { + public int Arg1 { get; private set; } + + public int Arg2 { get; private set; } + + public int Arg3 { get; private set; } + + public FooWithThreeParameters(int arg1, int arg2, int arg3) + { + Arg1 = arg1; + Arg2 = arg2; + Arg3 = arg3; + } + } + + public class FooWithFourParameters : IFoo + { + public int Arg1 { get; private set; } + + public int Arg2 { get; private set; } + + public int Arg3 { get; private set; } + + public int Arg4 { get; private set; } + + public FooWithFourParameters(int arg1, int arg2, int arg3, int arg4) + { + Arg1 = arg1; + Arg2 = arg2; + Arg3 = arg3; + Arg4 = arg4; + } + } + + + + public class AnotherFooWithValueTypeDependency : IFoo + { + public AnotherFooWithValueTypeDependency(int value) + { + Value = value; + } + + public int Value { get; private set; } + } + + public class FooWithValueTypePropertyDependency : IFoo + { + public int Value { get; set; } + } + + + public class FooWithEnumDependency : IFoo + { + public FooWithEnumDependency(Encoding value) + { + Value = value; + } + + public Encoding Value { get; private set; } + } + + public class FooWithEnumPropertyDependency : IFoo + { + + + public Encoding Value { get; set; } + } + + + public class FooWithEnumerableDependency : IFoo + { + public FooWithEnumerableDependency(IEnumerable bars) + { + Bars = bars; + } + + public IEnumerable Bars { get; private set; } + } + + public class FooWithArrayDependency : IFoo + { + public FooWithArrayDependency(IBar[] bars) + { + Bars = bars; + } + + public IEnumerable Bars { get; private set; } + } + + public class FooWithParamsArrayDependency : IFoo + { + public FooWithParamsArrayDependency(IBar[] bars) + { + Bars = bars; + } + + public IEnumerable Bars { get; private set; } + } + + public class FooWithEnumerablePropertyDependency : IFoo + { + public FooWithEnumerablePropertyDependency() + { + } + + public IEnumerable Bars { get; set; } + } + + public class FooWithRecursiveDependency : IFoo + { + public FooWithRecursiveDependency(IFoo foo) + { + } + } + + public class BarWithPropertyDependency : IBar + { + public IFoo Foo { get; set; } + } + + public interface IFoo { } + + public class FooWithPartiallyClosedGenericInterface : IFoo { } + + public interface IFoo { } + + public class Foo : IFoo { } + + public class AnotherFoo : IFoo { } + + public class FooWithGenericDependency : IFoo + { + public FooWithGenericDependency(T dependency) + { + Dependency = dependency; + } + + public T Dependency { get; private set; } + } + + public class FooWithOpenGenericDependency : IFoo + { + private readonly IBar dependency; + + public FooWithOpenGenericDependency(IBar dependency) + { + this.dependency = dependency; + } + + public IBar Dependency + { + get { return dependency; } + } + } + + public class FooWithSameOpenGenericDependencyTwice : IFoo + { + private readonly IBar bar1; + + private readonly IBar bar2; + + public FooWithSameOpenGenericDependencyTwice(IBar bar1, IBar bar2) + { + this.bar1 = bar1; + this.bar2 = bar2; + } + + public IBar Bar1 + { + get { return bar1; } + } + + public IBar Bar2 + { + get { return bar2; } + } + } + + + public class FooWithGenericPropertyDependency : IFoo + { + public T Dependency { get; set; } + } + + + public class FooWithStringTypeParameter : IFoo {} + + + public class FooWithLazyDependency : IFoo + { + public FooWithLazyDependency(Lazy lazyService) + { + LazyService = lazyService; + } + + public Lazy LazyService { get; private set; } + } + + public class FooWithTwoConstructors : IFoo + { + public FooWithTwoConstructors(int value) + { + } + + public FooWithTwoConstructors(string value) + { + } + } + + public class FooWithIndexer + { + public object this[int index] + { + get + { + return null; + } + set + { + + } + } + } + + public class FooWithObjectProperty + { + public object Property { get; set; } + } + + + public class FooWithMultipleConstructors : IFoo + { + public FooWithMultipleConstructors() + { + } + + public FooWithMultipleConstructors(IBar bar) + { + Bar = bar; + } + + public IBar Bar { get; private set; } + } + + + + + public class FooWithProperyDependency : IFoo + { + public IBar Bar { get; set; } + } + + public class FooWithFuncPropertyDependency : IFoo + { + public Func BarFunc { get; set; } + } + + + public class FooWithInheritedProperyDepenency : FooWithProperyDependency {} + + + + public class FooWithFuncDependency : IFoo + { + public FooWithFuncDependency(Func getBar) + { + GetBar = getBar; + } + public Func GetBar { get; private set; } + } + + public class FooWithNamedFuncDependency : IFoo + { + public FooWithNamedFuncDependency(Func getBar) + { + GetBar = getBar; + } + public Func GetBar { get; private set; } + } + + public class FooWithCustomFuncDependency : IFoo + { + public Func StringFunc { get; private set; } + + public FooWithCustomFuncDependency(Func stringFunc) + { + StringFunc = stringFunc; + } + } + + public class DisposableFoo : IFoo, IDisposable + { + public bool IsDisposed { get; private set; } + + public void Dispose() + { + IsDisposed = true; + } + } + + public class ConcreteFoo + { + + } + + public class ConcreteFooWithBaseClass : Foo + { + + } + + + public class LazyFooDecorator : IFoo + { + public Lazy Foo { get; private set; } + + public LazyFooDecorator(Lazy foo) + { + Foo = foo; + } + } + + public class AnotherLazyFooDecorator : IFoo + { + public Lazy Foo { get; private set; } + + public AnotherLazyFooDecorator(Lazy foo) + { + Foo = foo; + } + } + + public class FooWithConstructorAndPropertyDependency : IFoo + { + public FooWithConstructorAndPropertyDependency(IBar bar) + { + ConstructorInjectedBar = bar; + } + + public IBar ConstructorInjectedBar { get; private set; } + + public IBar Bar { get; set; } + } + + internal class InternalFooWithPublicConstructor : IFoo + { + public InternalFooWithPublicConstructor () {} + } + + internal class InternalFooWithInternalConstructor : IFoo + { + internal InternalFooWithInternalConstructor() { } + } + + + + public interface IFooFactory + { + IFoo CreateFoo(); + } + + public class FooFactory : IFooFactory + { + private readonly Func getFoo; + + public FooFactory(Func getFoo) + { + this.getFoo = getFoo; + } + + public IFoo CreateFoo() + { + return getFoo(); + } + } + + + public class FooWithDependencyAndArgument : IFoo + { + public int Value { get; private set; } + + public IBar Bar { get; private set; } + + public FooWithDependencyAndArgument(IBar bar, int value) + { + Value = value; + Bar = bar; + } + } + + + public abstract class AbstractFoo : IFoo {} + + + public class FooWithNestedPrivate : IFoo + { + private class NestedPrivateBar + { + + } + } + + public class FooWithGenericConstraint : IFoo where T:IBar + { + + } + + public interface IFooWithGenericInterfaceConstraint where T: IBar + { + + } + + public class FooWithGenericInterfaceConstraint : IFooWithGenericInterfaceConstraint + where T : IBar + { + } + + public class FooWithSameHashCode + { + public FooWithSameHashCode(int id) + { + Id = id; + } + + public int Id { get; private set; } + + public override bool Equals(object obj) + { + return ((FooWithSameHashCode)obj).Id == Id; + } + + public override int GetHashCode() + { + return 42; + } + } + + public class FooWithBrokenDependency + { + public FooWithBrokenDependency(IBar bar) + { } + } + + + public class DisposableLifetime : ILifetime, IDisposable + { + public bool IsDisposed { get; set; } + + public void Dispose() + { + IsDisposed = true; + } + + object ILifetime.GetInstance(Func createInstance, Scope scope) + { + return createInstance(); + } + } + + +} diff --git a/src/LightInject.xUnit2_2.Tests/SampleServices/SampleService.cs b/src/LightInject.xUnit2_2.Tests/SampleServices/SampleService.cs new file mode 100644 index 0000000..09be0df --- /dev/null +++ b/src/LightInject.xUnit2_2.Tests/SampleServices/SampleService.cs @@ -0,0 +1,6 @@ +namespace LightInject.SampleLibrary +{ + public interface ISampleService { } + + public class SampleService : ISampleService{ } +} \ No newline at end of file diff --git a/src/LightInject.xUnit2_2.Tests/xUnit2Tests.cs b/src/LightInject.xUnit2_2.Tests/xUnit2Tests.cs new file mode 100644 index 0000000..5f7560b --- /dev/null +++ b/src/LightInject.xUnit2_2.Tests/xUnit2Tests.cs @@ -0,0 +1,230 @@ +using System.Runtime.InteropServices.ComTypes; +using System.Text; + +namespace LightInject.xUnit2.Tests +{ + using System; + using System.Runtime.CompilerServices; + using System.Security.Cryptography; + using System.Threading; + using System.Threading.Tasks; + + using LightInject; + using LightInject.SampleLibrary; + + using Xunit; + + public class XunitTestsWithConfigureMethod + { + [Theory, InjectData] + public void MethodWithOneArgument(IFoo foo) + { + Assert.NotNull(foo); + } + + [Theory, InjectData] + public void MethodWithTwoArguments(IFoo foo, IBar bar) + { + Assert.NotNull(foo); + Assert.NotNull(bar); + } + + + [Theory, InjectData("SomeValue")] + public void MethodWithSingleValue(string value) + { + Assert.Equal("SomeValue", value); + } + + [Theory, InjectData("Value1", "Value2")] + public void MethodWithMultipleValues(string value1, string value2) + { + Assert.Equal("Value1", value1); + Assert.Equal("Value2", value2); + } + + + [Theory, InjectData("value1"), InjectData("value2")] + public void MethodWithMultipleInjectData(string value) + { + Assert.True(value == "value1" || value == "value2"); + } + + + [Theory, Scoped, InjectData("value1"), InjectData("value2")] + public void ScopedMethodWithMultipleInjectData(string value) + { + Assert.True(value == "value1" || value == "value2"); + } + + + [Theory, InjectData("value1")] + public void MethodWithServiceAndValue(IFoo foo, string value) + { + Assert.IsType(foo); + Assert.Equal("value1", value); + } + + + + public void MethodWithMissingService(int value) + { + + } + + [Fact] + public void MissingServiceThrowsException() + { + var attribute = new InjectDataAttribute(); + var method = typeof(XunitTestsWithConfigureMethod).GetMethod("MethodWithMissingService"); + + Assert.Throws(() => attribute.GetData(method)); + } + + [Theory] + [InjectData(0, 0, 0)] + [InjectData(1, 1, 2)] + [InjectData(2, 2, 4)] + [InjectData(5, 5, 10)] + public void ShouldAddNumbers(ICalculator calculator, int first, int second, int expected) + { + int result = calculator.Add(first, second); + Assert.Equal(expected, result); + } + + + internal static void Configure(IServiceContainer container) + { + container.Register(); + container.Register(); + container.Register(); + } + } + + + public class XunitBaseClass + { + internal static void Configure(IServiceContainer container) + { + container.Register(); + container.Register(); + } + } + + public class XunitBaseClassWithTest + { + [Theory, InjectData] + public void ShouldUseConfiguredService(IFoo foo) + { + if (this is XunitTestsWithInheritedTestMethod) + { + Assert.IsType(foo); + } + else + { + Assert.IsType(foo); + } + } + + internal static void Configure(IServiceContainer container) + { + container.Register(); + } + } + + public class XunitTestsWithInheritedTestMethod : XunitBaseClassWithTest + { + internal static void Configure(IServiceContainer container) + { + container.Register(); + } + } + + + + public class XunitTestsWithConfigureMethodInDerivedClass : XunitBaseClass + { + [Theory, InjectData] + public void ShouldBeAbleToReconfigureContainer(IFoo foo) + { + Assert.IsType(foo); + } + + internal new static void Configure(IServiceContainer container) + { + container.Register(); + } + + } + + public class XunitTestsWithConfigureMethodInBaseClass : XunitBaseClass + { + [Theory, InjectData] + public async void MethodWithOneArgument(IFoo foo) + { + await Task.Delay(100); + Assert.NotNull(foo); + } + } + + public class XUnitTestsWithScopedServices + { + [Theory, Scoped, InjectData] + public void MethodWithScopedArgument(IFoo foo) + { + Assert.IsType(foo); + } + + [Theory, Scoped, InjectData] + public void MethodWithTwoScopedArguments(IFoo foo, IBar bar) + { + Assert.IsType(foo); + Assert.IsType(bar); + } + + internal static void Configure(IServiceContainer container) + { + container.Register(new PerScopeLifetime()); + container.Register(new PerScopeLifetime()); + } + } + + public class XunitTestsWithMissingDependencies + { + public void MethodWithMissingDependency(IFoo foo) + { + + } + + [Fact] + public void MissingDependencyThrowsException() + { + var attribute = new InjectDataAttribute(); + var method = typeof(XunitTestsWithMissingDependencies).GetMethod("MethodWithMissingDependency"); + + Assert.Throws(() => attribute.GetData(method)); + } + + + public static void Configure(IServiceContainer container) + { + container.Register(); + } + } + + + public interface ICalculator + { + int Add(int first, int second); + } + + public class Calculator : ICalculator + { + public int Add(int first, int second) + { + return first + second; + } + } + + +} diff --git a/src/LightInject.xUnit2_2/LightInject.xUnit2.cs b/src/LightInject.xUnit2_2/LightInject.xUnit2.cs new file mode 100644 index 0000000..7aec0e7 --- /dev/null +++ b/src/LightInject.xUnit2_2/LightInject.xUnit2.cs @@ -0,0 +1,238 @@ +/********************************************************************************* + The MIT License (MIT) + + Copyright (c) 2014 bernhard.richter@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +****************************************************************************** + LightInject.xUnit version 3.0.0 + http://www.lightinject.net/ + http://twitter.com/bernhardrichter +******************************************************************************/ + +[module: System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.ReadabilityRules", "SA1126:PrefixCallsCorrectly", Justification = "Reviewed")] +[module: System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.ReadabilityRules", "SA1101:PrefixLocalCallsWithThis", Justification = "No inheritance")] +[module: System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.MaintainabilityRules", "SA1402:FileMayOnlyContainASingleClass", Justification = "Single source file deployment.")] +[module: System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1633:FileMustHaveHeader", Justification = "Custom header.")] +[module: System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1600:ElementsMustBeDocumented", Justification = "All public members are documented.")] +[module: System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.NamingRules", "SA1300:ElementMustBeginWithUpperCaseLetter", Justification = "Product name starts with lowercase letter.")] +[module: System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1649:FileHeaderFileNameDocumentationMustMatchTypeName", Justification = "Single source file deployment")] +namespace LightInject.xUnit2 +{ + using System; + using System.Collections.Concurrent; + using System.Collections.Generic; + using System.Diagnostics.CodeAnalysis; + using System.Linq; + using System.Reflection; + using LightInject; + using Xunit.Sdk; + + /// + /// Allows LightInject to resolve test method arguments. + /// + [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] + public class InjectDataAttribute : DataAttribute + { + private static readonly ConcurrentDictionary Containers = + new ConcurrentDictionary(); + + private readonly Stack data; + + static InjectDataAttribute() + { + // Since the GetData method is also executed during test discovery + // we need to ensure that we close all existing scopes. + AppDomain.CurrentDomain.DomainUnload += (sender, args) => EndAllScopes(); + } + + /// + /// Initializes a new instance of the class. + /// + public InjectDataAttribute() + { + data = new Stack(); + } + + /// + /// Initializes a new instance of the class. + /// + /// An array of values to be passed to the test method. + public InjectDataAttribute(params object[] data) + { + this.data = new Stack(data.Reverse()); + } + + /// + /// Ends the represented by the given . + /// + /// The representing the method for which to end the . + public static void EndScope(MethodInfo method) + { + IServiceContainer container; + if (Containers.TryGetValue(method.ReflectedType, out container)) + { + var scopeManager = container.ScopeManagerProvider.GetScopeManager(container); + if (scopeManager.CurrentScope != null) + { + scopeManager.CurrentScope.Dispose(); + } + } + } + + /// + /// Gets a list of argument data resolved using an instance. + /// + /// The test method currently being executed. + /// A list of argument data resolved using an instance. + public override IEnumerable GetData(MethodInfo methodUnderTest) + { + var container = GetContainer(methodUnderTest.ReflectedType); + ParameterInfo[] parameters = methodUnderTest.GetParameters(); + if (ShouldStartScope(methodUnderTest)) + { + container.BeginScope(); + } + + return ResolveParameters(container, parameters); + } + + /// + /// This method is only executed when the test app domains are unloaded. + /// + [ExcludeFromCodeCoverage] + private static void EndAllScopes() + { + foreach (var container in Containers.Values) + { + var scopeManager = container.ScopeManagerProvider.GetScopeManager(container); + while (scopeManager.CurrentScope != null) + { + container.Dispose(); + } + } + } + + private static bool ShouldStartScope(MethodInfo methodUnderTest) + { + return methodUnderTest.IsDefined(typeof(ScopedAttribute), true); + } + + private static IServiceContainer GetContainer(Type type) + { + return Containers.GetOrAdd(type, CreateContainer); + } + + private static IServiceContainer CreateContainer(Type type) + { + var container = new ServiceContainer(); + InvokeConfigureMethodIfPresent(type, container); + return container; + } + + private static object GetInstance(IServiceFactory factory, ParameterInfo parameter) + { + var instance = factory.TryGetInstance(parameter.ParameterType); + if (instance != null) + { + return instance; + } + + return factory.TryGetInstance(parameter.ParameterType, parameter.Name); + } + + private static void InvokeConfigureMethodIfPresent(Type type, IServiceContainer container) + { + var callSequence = new Stack(); + + while (type != typeof(object)) + { + var method = GetConfigureMethod(type); + if (method != null) + { + callSequence.Push(() => method.Invoke(null, new object[] { container })); + } + + type = type.BaseType; + } + + while (callSequence.Count > 0) + { + var action = callSequence.Pop(); + action(); + } + } + + private static MethodInfo GetConfigureMethod(Type type) + { + var composeMethod = type.GetMethod( + "Configure", + BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); + return composeMethod; + } + + private IEnumerable ResolveParameters(IServiceFactory factory, IEnumerable parameters) + { + return new[] { parameters.Select(p => ResolveParameter(factory, p)).ToArray() }; + } + + private object ResolveParameter(IServiceFactory factory, ParameterInfo parameter) + { + object instance; + try + { + instance = GetInstance(factory, parameter); + } + catch (InvalidOperationException exception) + { + const string errorMessage = "Unable to inject test method arguments. " + + "Create a static method in the test class with the following signature " + + "to configure the container: public static void Configure(IServiceContainer container)"; + throw new InvalidOperationException(errorMessage, exception); + } + + if (instance != null) + { + return instance; + } + + if (data.Count > 0) + { + return data.Pop(); + } + + throw new InvalidOperationException(string.Format("No value specified for parameter: {0}", parameter)); + } + } + + /// + /// Indicates that a new should be started for this test method. + /// + public class ScopedAttribute : BeforeAfterTestAttribute + { + /// + /// This method is called after the test method is executed. + /// + /// The method under test + public override void After(MethodInfo methodUnderTest) + { + InjectDataAttribute.EndScope(methodUnderTest); + } + } +} \ No newline at end of file diff --git a/src/LightInject.xUnit2_2/LightInject.xUnit2.csproj.DotSettings b/src/LightInject.xUnit2_2/LightInject.xUnit2.csproj.DotSettings new file mode 100644 index 0000000..662f956 --- /dev/null +++ b/src/LightInject.xUnit2_2/LightInject.xUnit2.csproj.DotSettings @@ -0,0 +1,2 @@ + + CSharp50 \ No newline at end of file diff --git a/src/LightInject.xUnit2_2/LightInject.xUnit2_2.csproj b/src/LightInject.xUnit2_2/LightInject.xUnit2_2.csproj new file mode 100644 index 0000000..d6abc3d --- /dev/null +++ b/src/LightInject.xUnit2_2/LightInject.xUnit2_2.csproj @@ -0,0 +1,74 @@ + + + + + Debug + AnyCPU + {245ABD3A-3FE2-480F-B4FF-6FC72AC11ACC} + Library + Properties + LightInject.xUnit2 + LightInject.xUnit2 + v4.6 + 512 + + + true + full + false + bin\Debug\ + TRACE;DEBUG;NET46 + prompt + 4 + bin\Debug\LightInject.xUnit2.XML + + + pdbonly + true + bin\Release\ + TRACE;NET46 + prompt + 4 + bin\Release\LightInject.xUnit2.XML + true + + + + + + + + + + + + + + + + + + + + + + 5.0.0 + + + 1.0.0 + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + 2.1.0 + + + + + \ No newline at end of file diff --git a/src/LightInject.xUnit2_2/NuGet/LightInject.Xunit2.Source.nuspec b/src/LightInject.xUnit2_2/NuGet/LightInject.Xunit2.Source.nuspec new file mode 100644 index 0000000..a142cc6 --- /dev/null +++ b/src/LightInject.xUnit2_2/NuGet/LightInject.Xunit2.Source.nuspec @@ -0,0 +1,26 @@ + + + + LightInject.xUnit.Source + 2.1.0 + Bernhard Richter + Bernhard Richter + http://opensource.org/licenses/MIT + http://seesharper.github.io/LightInject/ + false + An extension to the LightInject service container that enables dependency injection in xUnit test methods. + http://www.lightinject.net/#whatsnew + Bernhard Richter + Ioc Dependency-Injection Inversion-of-Control LightInject UnitTesting Test xUnit + + + + + + + + + + diff --git a/src/LightInject.xUnit2_2/NuGet/LightInject.Xunit2.nuspec b/src/LightInject.xUnit2_2/NuGet/LightInject.Xunit2.nuspec new file mode 100644 index 0000000..1598e50 --- /dev/null +++ b/src/LightInject.xUnit2_2/NuGet/LightInject.Xunit2.nuspec @@ -0,0 +1,20 @@ + + + + LightInject.xUnit + 2.1.0 + Bernhard Richter + Bernhard Richter + http://opensource.org/licenses/MIT + http://seesharper.github.io/LightInject/ + false + An extension to the LightInject service container that enables dependency injection in xUnit test methods. + http://www.lightinject.net/#whatsnew + Bernhard Richter + Ioc Dependency-Injection Inversion-of-Control LightInject UnitTesting Test xUnit + + + + + + diff --git a/src/LightInject.xUnit2/Properties/AssemblyInfo.cs b/src/LightInject.xUnit2_2/Properties/AssemblyInfo.cs similarity index 100% rename from src/LightInject.xUnit2/Properties/AssemblyInfo.cs rename to src/LightInject.xUnit2_2/Properties/AssemblyInfo.cs diff --git a/src/LightInject.xUnit2/project.json_ b/src/LightInject.xUnit2_2/project.json_ similarity index 100% rename from src/LightInject.xUnit2/project.json_ rename to src/LightInject.xUnit2_2/project.json_ diff --git a/src/MigrationBackup/b15c5e1f/LightInject.xUnit2.Tests_2/LightInject.xUnit2.Tests_2.csproj b/src/MigrationBackup/b15c5e1f/LightInject.xUnit2.Tests_2/LightInject.xUnit2.Tests_2.csproj new file mode 100644 index 0000000..61c995c --- /dev/null +++ b/src/MigrationBackup/b15c5e1f/LightInject.xUnit2.Tests_2/LightInject.xUnit2.Tests_2.csproj @@ -0,0 +1,98 @@ + + + + + + Debug + AnyCPU + {633CEBA8-AE04-40C8-86B5-BC5DBE22D0A0} + Library + Properties + LightInject.xUnit2.Tests + LightInject.xUnit2.Tests + v4.6 + 512 + + + + + true + full + false + bin\Debug\ + TRACE;DEBUG;NET46 + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE;NET46 + prompt + 4 + + + + ..\packages\LightInject.5.0.0\lib\net46\LightInject.dll + True + + + + + + + + + + + ..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll + True + + + ..\packages\xunit.assert.2.1.0\lib\dotnet\xunit.assert.dll + True + + + ..\packages\xunit.extensibility.core.2.1.0\lib\dotnet\xunit.core.dll + True + + + ..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll + True + + + + + + + + + + + + + + + {245abd3a-3fe2-480f-b4ff-6fc72ac11acc} + LightInject.xUnit2_2 + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + \ No newline at end of file diff --git a/src/MigrationBackup/b15c5e1f/LightInject.xUnit2.Tests_2/NuGetUpgradeLog.html b/src/MigrationBackup/b15c5e1f/LightInject.xUnit2.Tests_2/NuGetUpgradeLog.html new file mode 100644 index 0000000..e9232a2 --- /dev/null +++ b/src/MigrationBackup/b15c5e1f/LightInject.xUnit2.Tests_2/NuGetUpgradeLog.html @@ -0,0 +1,169 @@ + + + + + NuGetMigrationLog +

+ NuGet Migration Report - LightInject.xUnit2.Tests_2

Overview

Migration to PackageReference was completed successfully. Please build and run your solution to verify that all packages are available.
+ If you run into any problems, have feedback, questions, or concerns, please + file an issue on the NuGet GitHub repository.

Packages processed

Top-level dependencies:

Package IdVersion
CoverageToXml + v1.0.0
LightInject + v5.0.0
ReportGenerator + v2.3.5
xunit + v2.1.0
xunit.runner.visualstudio + v2.1.0

Transitive dependencies:

Package IdVersion
xunit.abstractions + v2.0.0
xunit.assert + v2.1.0
xunit.core + v2.1.0
xunit.extensibility.core + v2.1.0
xunit.extensibility.execution + v2.1.0

Package compatibility issues

Description
+ No issues were found. +
\ No newline at end of file diff --git a/src/LightInject.xUnit2.Tests/packages.config b/src/MigrationBackup/b15c5e1f/LightInject.xUnit2.Tests_2/packages.config similarity index 100% rename from src/LightInject.xUnit2.Tests/packages.config rename to src/MigrationBackup/b15c5e1f/LightInject.xUnit2.Tests_2/packages.config diff --git a/src/MigrationBackup/e0a97129/LightInject.xUnit2_2/LightInject.xUnit2_2.csproj b/src/MigrationBackup/e0a97129/LightInject.xUnit2_2/LightInject.xUnit2_2.csproj new file mode 100644 index 0000000..4481261 --- /dev/null +++ b/src/MigrationBackup/e0a97129/LightInject.xUnit2_2/LightInject.xUnit2_2.csproj @@ -0,0 +1,86 @@ + + + + + Debug + AnyCPU + {245ABD3A-3FE2-480F-B4FF-6FC72AC11ACC} + Library + Properties + LightInject.xUnit2 + LightInject.xUnit2 + v4.6 + 512 + + + true + full + false + bin\Debug\ + TRACE;DEBUG;NET46 + prompt + 4 + bin\Debug\LightInject.xUnit2.XML + + + pdbonly + true + bin\Release\ + TRACE;NET46 + prompt + 4 + bin\Release\LightInject.xUnit2.XML + true + + + + ..\packages\LightInject.5.0.0\lib\net46\LightInject.dll + True + + + + + + + + + + + ..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll + False + True + + + ..\packages\xunit.extensibility.core.2.1.0\lib\dotnet\xunit.core.dll + False + True + + + ..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll + False + True + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/MigrationBackup/e0a97129/LightInject.xUnit2_2/NuGetUpgradeLog.html b/src/MigrationBackup/e0a97129/LightInject.xUnit2_2/NuGetUpgradeLog.html new file mode 100644 index 0000000..3423b79 --- /dev/null +++ b/src/MigrationBackup/e0a97129/LightInject.xUnit2_2/NuGetUpgradeLog.html @@ -0,0 +1,165 @@ + + + + + NuGetMigrationLog +

+ NuGet Migration Report - LightInject.xUnit2_2

Overview

Migration to PackageReference was completed successfully. Please build and run your solution to verify that all packages are available.
+ If you run into any problems, have feedback, questions, or concerns, please + file an issue on the NuGet GitHub repository.

Packages processed

Top-level dependencies:

Package IdVersion
LightInject + v5.0.0
StyleCop.Analyzers + v1.0.0
xunit.core + v2.1.0

Transitive dependencies:

Package IdVersion
xunit.abstractions + v2.0.0
xunit.extensibility.core + v2.1.0
xunit.extensibility.execution + v2.1.0

Package compatibility issues

Description
+ No issues were found. +
\ No newline at end of file diff --git a/src/LightInject.xUnit2/packages.config b/src/MigrationBackup/e0a97129/LightInject.xUnit2_2/packages.config similarity index 100% rename from src/LightInject.xUnit2/packages.config rename to src/MigrationBackup/e0a97129/LightInject.xUnit2_2/packages.config From db0208b101dd46210807daed90059dbf6e16a34e Mon Sep 17 00:00:00 2001 From: Frederik Date: Thu, 27 May 2021 15:47:16 +0200 Subject: [PATCH 2/2] Removed old code --- ...ightInject.xUnit2.Tests.csproj.DotSettings | 2 - .../LightInject.xUnit2.Tests_2.csproj | 85 -- ...htInject.xUnit2.Tests_2.csproj.DotSettings | 2 - .../Properties/AssemblyInfo.cs | 36 - .../SampleServices/Bar.cs | 74 -- .../SampleServices/Foo.cs | 829 ------------------ .../SampleServices/SampleService.cs | 6 - src/LightInject.xUnit2_2.Tests/xUnit2Tests.cs | 230 ----- .../LightInject.xUnit2.cs | 238 ----- .../LightInject.xUnit2.csproj.DotSettings | 2 - .../LightInject.xUnit2_2.csproj | 74 -- .../NuGet/LightInject.Xunit2.Source.nuspec | 26 - .../NuGet/LightInject.Xunit2.nuspec | 20 - .../Properties/AssemblyInfo.cs | 45 - src/LightInject.xUnit2_2/project.json_ | 31 - .../LightInject.xUnit2.Tests_2.csproj | 98 --- .../NuGetUpgradeLog.html | 169 ---- .../packages.config | 13 - .../LightInject.xUnit2_2.csproj | 86 -- .../LightInject.xUnit2_2/NuGetUpgradeLog.html | 165 ---- .../LightInject.xUnit2_2/packages.config | 9 - 21 files changed, 2240 deletions(-) delete mode 100644 src/LightInject.xUnit2_2.Tests/LightInject.xUnit2.Tests.csproj.DotSettings delete mode 100644 src/LightInject.xUnit2_2.Tests/LightInject.xUnit2.Tests_2.csproj delete mode 100644 src/LightInject.xUnit2_2.Tests/LightInject.xUnit2.Tests_2.csproj.DotSettings delete mode 100644 src/LightInject.xUnit2_2.Tests/Properties/AssemblyInfo.cs delete mode 100644 src/LightInject.xUnit2_2.Tests/SampleServices/Bar.cs delete mode 100644 src/LightInject.xUnit2_2.Tests/SampleServices/Foo.cs delete mode 100644 src/LightInject.xUnit2_2.Tests/SampleServices/SampleService.cs delete mode 100644 src/LightInject.xUnit2_2.Tests/xUnit2Tests.cs delete mode 100644 src/LightInject.xUnit2_2/LightInject.xUnit2.cs delete mode 100644 src/LightInject.xUnit2_2/LightInject.xUnit2.csproj.DotSettings delete mode 100644 src/LightInject.xUnit2_2/LightInject.xUnit2_2.csproj delete mode 100644 src/LightInject.xUnit2_2/NuGet/LightInject.Xunit2.Source.nuspec delete mode 100644 src/LightInject.xUnit2_2/NuGet/LightInject.Xunit2.nuspec delete mode 100644 src/LightInject.xUnit2_2/Properties/AssemblyInfo.cs delete mode 100644 src/LightInject.xUnit2_2/project.json_ delete mode 100644 src/MigrationBackup/b15c5e1f/LightInject.xUnit2.Tests_2/LightInject.xUnit2.Tests_2.csproj delete mode 100644 src/MigrationBackup/b15c5e1f/LightInject.xUnit2.Tests_2/NuGetUpgradeLog.html delete mode 100644 src/MigrationBackup/b15c5e1f/LightInject.xUnit2.Tests_2/packages.config delete mode 100644 src/MigrationBackup/e0a97129/LightInject.xUnit2_2/LightInject.xUnit2_2.csproj delete mode 100644 src/MigrationBackup/e0a97129/LightInject.xUnit2_2/NuGetUpgradeLog.html delete mode 100644 src/MigrationBackup/e0a97129/LightInject.xUnit2_2/packages.config diff --git a/src/LightInject.xUnit2_2.Tests/LightInject.xUnit2.Tests.csproj.DotSettings b/src/LightInject.xUnit2_2.Tests/LightInject.xUnit2.Tests.csproj.DotSettings deleted file mode 100644 index 662f956..0000000 --- a/src/LightInject.xUnit2_2.Tests/LightInject.xUnit2.Tests.csproj.DotSettings +++ /dev/null @@ -1,2 +0,0 @@ - - CSharp50 \ No newline at end of file diff --git a/src/LightInject.xUnit2_2.Tests/LightInject.xUnit2.Tests_2.csproj b/src/LightInject.xUnit2_2.Tests/LightInject.xUnit2.Tests_2.csproj deleted file mode 100644 index 0c6f368..0000000 --- a/src/LightInject.xUnit2_2.Tests/LightInject.xUnit2.Tests_2.csproj +++ /dev/null @@ -1,85 +0,0 @@ - - - - - Debug - AnyCPU - {633CEBA8-AE04-40C8-86B5-BC5DBE22D0A0} - Library - Properties - LightInject.xUnit2.Tests - LightInject.xUnit2.Tests - v4.6 - 512 - - - - - true - full - false - bin\Debug\ - TRACE;DEBUG;NET46 - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE;NET46 - prompt - 4 - - - - - - - - - - - - - - - - - - - - - {245abd3a-3fe2-480f-b4ff-6fc72ac11acc} - LightInject.xUnit2_2 - - - - - - - - 1.0.0 - - - 5.0.0 - - - 2.3.5 - - - 2.1.0 - - - 2.1.0 - - - - - \ No newline at end of file diff --git a/src/LightInject.xUnit2_2.Tests/LightInject.xUnit2.Tests_2.csproj.DotSettings b/src/LightInject.xUnit2_2.Tests/LightInject.xUnit2.Tests_2.csproj.DotSettings deleted file mode 100644 index 662f956..0000000 --- a/src/LightInject.xUnit2_2.Tests/LightInject.xUnit2.Tests_2.csproj.DotSettings +++ /dev/null @@ -1,2 +0,0 @@ - - CSharp50 \ No newline at end of file diff --git a/src/LightInject.xUnit2_2.Tests/Properties/AssemblyInfo.cs b/src/LightInject.xUnit2_2.Tests/Properties/AssemblyInfo.cs deleted file mode 100644 index 62dc3f1..0000000 --- a/src/LightInject.xUnit2_2.Tests/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("LightInject.xUnit2.Tests")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("LightInject.xUnit2.Tests")] -[assembly: AssemblyCopyright("Copyright © 2015")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("633ceba8-ae04-40c8-86b5-bc5dbe22d0a0")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/LightInject.xUnit2_2.Tests/SampleServices/Bar.cs b/src/LightInject.xUnit2_2.Tests/SampleServices/Bar.cs deleted file mode 100644 index 3e9f8ab..0000000 --- a/src/LightInject.xUnit2_2.Tests/SampleServices/Bar.cs +++ /dev/null @@ -1,74 +0,0 @@ -using System; - -namespace LightInject.SampleLibrary -{ - public class FooWithStaticConstructor - { - private FooWithStaticConstructor() - { - } - - static FooWithStaticConstructor() - { - - } - } - - public class FooWithPrivateConstructor - { - private FooWithPrivateConstructor() - { - } - } - - - public interface IBar - { - } - - public class Bar : IBar - { - [ThreadStatic] - public static int InitializeCount = 0; - - public Bar() - { - InitializeCount++; - } - } - - public class BarMock : IBar - { - - } - - - public interface IBar { } - - public class Bar : IBar { } - - public class BarWithFooDependency : IBar - { - public IFoo Foo { get; private set; } - - public BarWithFooDependency(IFoo foo) - { - Foo = foo; - } - } - - - public class AnotherBar : IBar - { - } - - public class BrokenBar : IBar - { - public BrokenBar() - { - throw new BrokenBarException(); - } - } - - public class BrokenBarException : Exception { } -} \ No newline at end of file diff --git a/src/LightInject.xUnit2_2.Tests/SampleServices/Foo.cs b/src/LightInject.xUnit2_2.Tests/SampleServices/Foo.cs deleted file mode 100644 index f5044f1..0000000 --- a/src/LightInject.xUnit2_2.Tests/SampleServices/Foo.cs +++ /dev/null @@ -1,829 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace LightInject.SampleLibrary -{ - using System.Diagnostics; - using System.Threading.Tasks; - - public interface IFooWithProperty - { - string Value { get; } - } - - public class FooWithProperty : IFooWithProperty - { - public string Value - { - get - { - return "SomeValue"; - } - } - } - - public class FooWithCompilerGeneratedType : IFoo - { - public Func SomeAction - { - get - { - string someString = "Somestring"; - return () => someString; - } - } - - } - -#if NET45 || NET46 - - public interface IAsyncFoo - { - Task GetBar(); - } - - public class AsyncFoo : IAsyncFoo - { - private readonly Lazy lazyBar; - - public AsyncFoo(Lazy lazyBar) - { - this.lazyBar = lazyBar; - } - - public async Task GetBar() - { - await Task.Delay(10); - return lazyBar.Value; - } - - - } - -#endif - - public interface IFoo { } - - public class Foo : IFoo - { - public static int Instances { get; set; } - - public Foo() - { - Instances++; - } - } - - public class DerivedFoo : Foo - { - - } - - - public class FooWithStaticDependency : IFoo - { - public static IBar Bar { get; set; } - } - - public class FooMock : IFoo - { - - } - - public class FooMock : IFoo{} - - - public class AnotherFoo : IFoo { } - - public class FooWithDependency : IFoo - { - public FooWithDependency(IBar bar) - { - Bar = bar; - } - - public IBar Bar { get; private set; } - } - - public class AnotherFooWithDependency : IFoo - { - public AnotherFooWithDependency(IBar bar) - { - Bar = bar; - } - - public IBar Bar { get; private set; } - } - - - - - - public class FooWithEnumerableIFooDependency : IFoo - { - public IEnumerable FooList { get; private set; } - - public FooWithEnumerableIFooDependency(IEnumerable fooList) - { - FooList = fooList; - } - } - - public class FooWithEnumerableAndRegularDependency : IFoo - { - public IEnumerable Bars { get; private set; } - - public IBar Bar { get; private set; } - - public FooWithEnumerableAndRegularDependency(IEnumerable bars, IBar bar) - { - Bars = bars; - Bar = bar; - } - } - - public class FooWithStaticProperty : IFoo - { - public static IBar Bar { get; set; } - } - - - public class FooWithSameDependencyTwice : IFoo - { - private readonly IBar m_bar1; - - private readonly IBar m_bar2; - - public FooWithSameDependencyTwice(IBar bar1, IBar bar2) - { - m_bar1 = bar1; - m_bar2 = bar2; - } - - public IBar Bar2 - { - get - { - return this.m_bar2; - } - } - - public IBar Bar1 - { - get - { - return this.m_bar1; - } - } - } - - public class FooWithSampleServiceDependency : IFoo - { - public FooWithSampleServiceDependency(IBar bar, ISampleService sampleService) - { - SampleService = sampleService; - Bar = bar; - } - public ISampleService SampleService { get; private set; } - public IBar Bar { get; private set; } - } - - - public class BarWithSampleServiceDependency : IBar - { - public BarWithSampleServiceDependency(ISampleService sampleService) - { - SampleService = sampleService; - } - - public ISampleService SampleService { get; private set; } - } - - - - - public class FooWithSamePropertyDependencyTwice : IFoo - { - public IBar Bar1 { get; set; } - - public IBar Bar2 { get; set; } - } - - - public class FooDecorator : IFoo - { - public FooDecorator(IFoo foo) - { - } - } - - - public class ClosedGenericFooDecorator : IFoo - { - public ClosedGenericFooDecorator(IFoo foo) - { - } - } - - public class FooDecoratorWithTargetAsPropertyDependency : IFoo - { - public IFoo Foo { get; set; } - } - - - - public class AnotherFooDecorator : IFoo - { - public AnotherFooDecorator(IFoo foo) - { - } - } - - public class FooDecorator : IFoo - { - private readonly IFoo foo; - - public FooDecorator(IFoo foo) - { - this.foo = foo; - } - - public IFoo DecoratedInstance - { - get - { - return this.foo; - } - } - } - - public class BarDecorator : IBar - { - [ThreadStatic] - public static int Instances; - - public BarDecorator(IBar bar) - { - Instances++; - } - } - - - public class FooDecoratorWithDependency : IFoo - { - public FooDecoratorWithDependency(IFoo foo, IBar bar) - { - Foo = foo; - Bar = bar; - } - - public IFoo Foo { get; private set; } - - public IBar Bar { get; private set; } - } - - public class FooDecoratorWithDependencyFirst : IFoo - { - public FooDecoratorWithDependencyFirst(IBar bar, IFoo foo) - { - Foo = foo; - Bar = bar; - } - - public IFoo Foo { get; private set; } - - public IBar Bar { get; private set; } - } - - - public class AnotherFooDecorator : IFoo - { - private readonly IFoo foo; - - public AnotherFooDecorator(IFoo foo) - { - this.foo = foo; - } - - public IFoo DecoratedInstance - { - get - { - return this.foo; - } - } - } - - - - public class FooWithReferenceTypeDependency : IFoo - { - public FooWithReferenceTypeDependency(string value) - { - Value = value; - } - - public string Value { get; private set; } - } - - public class FooWithReferenceTypePropertyDependency : IFoo - { - public string Value { get; set; } - } - - public class FooWithValueTypeDependency : IFoo - { - public FooWithValueTypeDependency(int value) - { - Value = value; - } - - public int Value { get; private set; } - } - - public class FooWithOneParameter : IFoo - { - public int Arg1 { get; private set; } - - public FooWithOneParameter(int arg1) - { - Arg1 = arg1; - } - } - - public class FooWithTwoParameters : IFoo - { - public int Arg1 { get; private set; } - - public int Arg2 { get; private set; } - - public FooWithTwoParameters(int arg1, int arg2) - { - Arg1 = arg1; - Arg2 = arg2; - } - } - - public class FooWithThreeParameters : IFoo - { - public int Arg1 { get; private set; } - - public int Arg2 { get; private set; } - - public int Arg3 { get; private set; } - - public FooWithThreeParameters(int arg1, int arg2, int arg3) - { - Arg1 = arg1; - Arg2 = arg2; - Arg3 = arg3; - } - } - - public class FooWithFourParameters : IFoo - { - public int Arg1 { get; private set; } - - public int Arg2 { get; private set; } - - public int Arg3 { get; private set; } - - public int Arg4 { get; private set; } - - public FooWithFourParameters(int arg1, int arg2, int arg3, int arg4) - { - Arg1 = arg1; - Arg2 = arg2; - Arg3 = arg3; - Arg4 = arg4; - } - } - - - - public class AnotherFooWithValueTypeDependency : IFoo - { - public AnotherFooWithValueTypeDependency(int value) - { - Value = value; - } - - public int Value { get; private set; } - } - - public class FooWithValueTypePropertyDependency : IFoo - { - public int Value { get; set; } - } - - - public class FooWithEnumDependency : IFoo - { - public FooWithEnumDependency(Encoding value) - { - Value = value; - } - - public Encoding Value { get; private set; } - } - - public class FooWithEnumPropertyDependency : IFoo - { - - - public Encoding Value { get; set; } - } - - - public class FooWithEnumerableDependency : IFoo - { - public FooWithEnumerableDependency(IEnumerable bars) - { - Bars = bars; - } - - public IEnumerable Bars { get; private set; } - } - - public class FooWithArrayDependency : IFoo - { - public FooWithArrayDependency(IBar[] bars) - { - Bars = bars; - } - - public IEnumerable Bars { get; private set; } - } - - public class FooWithParamsArrayDependency : IFoo - { - public FooWithParamsArrayDependency(IBar[] bars) - { - Bars = bars; - } - - public IEnumerable Bars { get; private set; } - } - - public class FooWithEnumerablePropertyDependency : IFoo - { - public FooWithEnumerablePropertyDependency() - { - } - - public IEnumerable Bars { get; set; } - } - - public class FooWithRecursiveDependency : IFoo - { - public FooWithRecursiveDependency(IFoo foo) - { - } - } - - public class BarWithPropertyDependency : IBar - { - public IFoo Foo { get; set; } - } - - public interface IFoo { } - - public class FooWithPartiallyClosedGenericInterface : IFoo { } - - public interface IFoo { } - - public class Foo : IFoo { } - - public class AnotherFoo : IFoo { } - - public class FooWithGenericDependency : IFoo - { - public FooWithGenericDependency(T dependency) - { - Dependency = dependency; - } - - public T Dependency { get; private set; } - } - - public class FooWithOpenGenericDependency : IFoo - { - private readonly IBar dependency; - - public FooWithOpenGenericDependency(IBar dependency) - { - this.dependency = dependency; - } - - public IBar Dependency - { - get { return dependency; } - } - } - - public class FooWithSameOpenGenericDependencyTwice : IFoo - { - private readonly IBar bar1; - - private readonly IBar bar2; - - public FooWithSameOpenGenericDependencyTwice(IBar bar1, IBar bar2) - { - this.bar1 = bar1; - this.bar2 = bar2; - } - - public IBar Bar1 - { - get { return bar1; } - } - - public IBar Bar2 - { - get { return bar2; } - } - } - - - public class FooWithGenericPropertyDependency : IFoo - { - public T Dependency { get; set; } - } - - - public class FooWithStringTypeParameter : IFoo {} - - - public class FooWithLazyDependency : IFoo - { - public FooWithLazyDependency(Lazy lazyService) - { - LazyService = lazyService; - } - - public Lazy LazyService { get; private set; } - } - - public class FooWithTwoConstructors : IFoo - { - public FooWithTwoConstructors(int value) - { - } - - public FooWithTwoConstructors(string value) - { - } - } - - public class FooWithIndexer - { - public object this[int index] - { - get - { - return null; - } - set - { - - } - } - } - - public class FooWithObjectProperty - { - public object Property { get; set; } - } - - - public class FooWithMultipleConstructors : IFoo - { - public FooWithMultipleConstructors() - { - } - - public FooWithMultipleConstructors(IBar bar) - { - Bar = bar; - } - - public IBar Bar { get; private set; } - } - - - - - public class FooWithProperyDependency : IFoo - { - public IBar Bar { get; set; } - } - - public class FooWithFuncPropertyDependency : IFoo - { - public Func BarFunc { get; set; } - } - - - public class FooWithInheritedProperyDepenency : FooWithProperyDependency {} - - - - public class FooWithFuncDependency : IFoo - { - public FooWithFuncDependency(Func getBar) - { - GetBar = getBar; - } - public Func GetBar { get; private set; } - } - - public class FooWithNamedFuncDependency : IFoo - { - public FooWithNamedFuncDependency(Func getBar) - { - GetBar = getBar; - } - public Func GetBar { get; private set; } - } - - public class FooWithCustomFuncDependency : IFoo - { - public Func StringFunc { get; private set; } - - public FooWithCustomFuncDependency(Func stringFunc) - { - StringFunc = stringFunc; - } - } - - public class DisposableFoo : IFoo, IDisposable - { - public bool IsDisposed { get; private set; } - - public void Dispose() - { - IsDisposed = true; - } - } - - public class ConcreteFoo - { - - } - - public class ConcreteFooWithBaseClass : Foo - { - - } - - - public class LazyFooDecorator : IFoo - { - public Lazy Foo { get; private set; } - - public LazyFooDecorator(Lazy foo) - { - Foo = foo; - } - } - - public class AnotherLazyFooDecorator : IFoo - { - public Lazy Foo { get; private set; } - - public AnotherLazyFooDecorator(Lazy foo) - { - Foo = foo; - } - } - - public class FooWithConstructorAndPropertyDependency : IFoo - { - public FooWithConstructorAndPropertyDependency(IBar bar) - { - ConstructorInjectedBar = bar; - } - - public IBar ConstructorInjectedBar { get; private set; } - - public IBar Bar { get; set; } - } - - internal class InternalFooWithPublicConstructor : IFoo - { - public InternalFooWithPublicConstructor () {} - } - - internal class InternalFooWithInternalConstructor : IFoo - { - internal InternalFooWithInternalConstructor() { } - } - - - - public interface IFooFactory - { - IFoo CreateFoo(); - } - - public class FooFactory : IFooFactory - { - private readonly Func getFoo; - - public FooFactory(Func getFoo) - { - this.getFoo = getFoo; - } - - public IFoo CreateFoo() - { - return getFoo(); - } - } - - - public class FooWithDependencyAndArgument : IFoo - { - public int Value { get; private set; } - - public IBar Bar { get; private set; } - - public FooWithDependencyAndArgument(IBar bar, int value) - { - Value = value; - Bar = bar; - } - } - - - public abstract class AbstractFoo : IFoo {} - - - public class FooWithNestedPrivate : IFoo - { - private class NestedPrivateBar - { - - } - } - - public class FooWithGenericConstraint : IFoo where T:IBar - { - - } - - public interface IFooWithGenericInterfaceConstraint where T: IBar - { - - } - - public class FooWithGenericInterfaceConstraint : IFooWithGenericInterfaceConstraint - where T : IBar - { - } - - public class FooWithSameHashCode - { - public FooWithSameHashCode(int id) - { - Id = id; - } - - public int Id { get; private set; } - - public override bool Equals(object obj) - { - return ((FooWithSameHashCode)obj).Id == Id; - } - - public override int GetHashCode() - { - return 42; - } - } - - public class FooWithBrokenDependency - { - public FooWithBrokenDependency(IBar bar) - { } - } - - - public class DisposableLifetime : ILifetime, IDisposable - { - public bool IsDisposed { get; set; } - - public void Dispose() - { - IsDisposed = true; - } - - object ILifetime.GetInstance(Func createInstance, Scope scope) - { - return createInstance(); - } - } - - -} diff --git a/src/LightInject.xUnit2_2.Tests/SampleServices/SampleService.cs b/src/LightInject.xUnit2_2.Tests/SampleServices/SampleService.cs deleted file mode 100644 index 09be0df..0000000 --- a/src/LightInject.xUnit2_2.Tests/SampleServices/SampleService.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace LightInject.SampleLibrary -{ - public interface ISampleService { } - - public class SampleService : ISampleService{ } -} \ No newline at end of file diff --git a/src/LightInject.xUnit2_2.Tests/xUnit2Tests.cs b/src/LightInject.xUnit2_2.Tests/xUnit2Tests.cs deleted file mode 100644 index 5f7560b..0000000 --- a/src/LightInject.xUnit2_2.Tests/xUnit2Tests.cs +++ /dev/null @@ -1,230 +0,0 @@ -using System.Runtime.InteropServices.ComTypes; -using System.Text; - -namespace LightInject.xUnit2.Tests -{ - using System; - using System.Runtime.CompilerServices; - using System.Security.Cryptography; - using System.Threading; - using System.Threading.Tasks; - - using LightInject; - using LightInject.SampleLibrary; - - using Xunit; - - public class XunitTestsWithConfigureMethod - { - [Theory, InjectData] - public void MethodWithOneArgument(IFoo foo) - { - Assert.NotNull(foo); - } - - [Theory, InjectData] - public void MethodWithTwoArguments(IFoo foo, IBar bar) - { - Assert.NotNull(foo); - Assert.NotNull(bar); - } - - - [Theory, InjectData("SomeValue")] - public void MethodWithSingleValue(string value) - { - Assert.Equal("SomeValue", value); - } - - [Theory, InjectData("Value1", "Value2")] - public void MethodWithMultipleValues(string value1, string value2) - { - Assert.Equal("Value1", value1); - Assert.Equal("Value2", value2); - } - - - [Theory, InjectData("value1"), InjectData("value2")] - public void MethodWithMultipleInjectData(string value) - { - Assert.True(value == "value1" || value == "value2"); - } - - - [Theory, Scoped, InjectData("value1"), InjectData("value2")] - public void ScopedMethodWithMultipleInjectData(string value) - { - Assert.True(value == "value1" || value == "value2"); - } - - - [Theory, InjectData("value1")] - public void MethodWithServiceAndValue(IFoo foo, string value) - { - Assert.IsType(foo); - Assert.Equal("value1", value); - } - - - - public void MethodWithMissingService(int value) - { - - } - - [Fact] - public void MissingServiceThrowsException() - { - var attribute = new InjectDataAttribute(); - var method = typeof(XunitTestsWithConfigureMethod).GetMethod("MethodWithMissingService"); - - Assert.Throws(() => attribute.GetData(method)); - } - - [Theory] - [InjectData(0, 0, 0)] - [InjectData(1, 1, 2)] - [InjectData(2, 2, 4)] - [InjectData(5, 5, 10)] - public void ShouldAddNumbers(ICalculator calculator, int first, int second, int expected) - { - int result = calculator.Add(first, second); - Assert.Equal(expected, result); - } - - - internal static void Configure(IServiceContainer container) - { - container.Register(); - container.Register(); - container.Register(); - } - } - - - public class XunitBaseClass - { - internal static void Configure(IServiceContainer container) - { - container.Register(); - container.Register(); - } - } - - public class XunitBaseClassWithTest - { - [Theory, InjectData] - public void ShouldUseConfiguredService(IFoo foo) - { - if (this is XunitTestsWithInheritedTestMethod) - { - Assert.IsType(foo); - } - else - { - Assert.IsType(foo); - } - } - - internal static void Configure(IServiceContainer container) - { - container.Register(); - } - } - - public class XunitTestsWithInheritedTestMethod : XunitBaseClassWithTest - { - internal static void Configure(IServiceContainer container) - { - container.Register(); - } - } - - - - public class XunitTestsWithConfigureMethodInDerivedClass : XunitBaseClass - { - [Theory, InjectData] - public void ShouldBeAbleToReconfigureContainer(IFoo foo) - { - Assert.IsType(foo); - } - - internal new static void Configure(IServiceContainer container) - { - container.Register(); - } - - } - - public class XunitTestsWithConfigureMethodInBaseClass : XunitBaseClass - { - [Theory, InjectData] - public async void MethodWithOneArgument(IFoo foo) - { - await Task.Delay(100); - Assert.NotNull(foo); - } - } - - public class XUnitTestsWithScopedServices - { - [Theory, Scoped, InjectData] - public void MethodWithScopedArgument(IFoo foo) - { - Assert.IsType(foo); - } - - [Theory, Scoped, InjectData] - public void MethodWithTwoScopedArguments(IFoo foo, IBar bar) - { - Assert.IsType(foo); - Assert.IsType(bar); - } - - internal static void Configure(IServiceContainer container) - { - container.Register(new PerScopeLifetime()); - container.Register(new PerScopeLifetime()); - } - } - - public class XunitTestsWithMissingDependencies - { - public void MethodWithMissingDependency(IFoo foo) - { - - } - - [Fact] - public void MissingDependencyThrowsException() - { - var attribute = new InjectDataAttribute(); - var method = typeof(XunitTestsWithMissingDependencies).GetMethod("MethodWithMissingDependency"); - - Assert.Throws(() => attribute.GetData(method)); - } - - - public static void Configure(IServiceContainer container) - { - container.Register(); - } - } - - - public interface ICalculator - { - int Add(int first, int second); - } - - public class Calculator : ICalculator - { - public int Add(int first, int second) - { - return first + second; - } - } - - -} diff --git a/src/LightInject.xUnit2_2/LightInject.xUnit2.cs b/src/LightInject.xUnit2_2/LightInject.xUnit2.cs deleted file mode 100644 index 7aec0e7..0000000 --- a/src/LightInject.xUnit2_2/LightInject.xUnit2.cs +++ /dev/null @@ -1,238 +0,0 @@ -/********************************************************************************* - The MIT License (MIT) - - Copyright (c) 2014 bernhard.richter@gmail.com - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. -****************************************************************************** - LightInject.xUnit version 3.0.0 - http://www.lightinject.net/ - http://twitter.com/bernhardrichter -******************************************************************************/ - -[module: System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.ReadabilityRules", "SA1126:PrefixCallsCorrectly", Justification = "Reviewed")] -[module: System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.ReadabilityRules", "SA1101:PrefixLocalCallsWithThis", Justification = "No inheritance")] -[module: System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.MaintainabilityRules", "SA1402:FileMayOnlyContainASingleClass", Justification = "Single source file deployment.")] -[module: System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1633:FileMustHaveHeader", Justification = "Custom header.")] -[module: System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1600:ElementsMustBeDocumented", Justification = "All public members are documented.")] -[module: System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.NamingRules", "SA1300:ElementMustBeginWithUpperCaseLetter", Justification = "Product name starts with lowercase letter.")] -[module: System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1649:FileHeaderFileNameDocumentationMustMatchTypeName", Justification = "Single source file deployment")] -namespace LightInject.xUnit2 -{ - using System; - using System.Collections.Concurrent; - using System.Collections.Generic; - using System.Diagnostics.CodeAnalysis; - using System.Linq; - using System.Reflection; - using LightInject; - using Xunit.Sdk; - - /// - /// Allows LightInject to resolve test method arguments. - /// - [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] - public class InjectDataAttribute : DataAttribute - { - private static readonly ConcurrentDictionary Containers = - new ConcurrentDictionary(); - - private readonly Stack data; - - static InjectDataAttribute() - { - // Since the GetData method is also executed during test discovery - // we need to ensure that we close all existing scopes. - AppDomain.CurrentDomain.DomainUnload += (sender, args) => EndAllScopes(); - } - - /// - /// Initializes a new instance of the class. - /// - public InjectDataAttribute() - { - data = new Stack(); - } - - /// - /// Initializes a new instance of the class. - /// - /// An array of values to be passed to the test method. - public InjectDataAttribute(params object[] data) - { - this.data = new Stack(data.Reverse()); - } - - /// - /// Ends the represented by the given . - /// - /// The representing the method for which to end the . - public static void EndScope(MethodInfo method) - { - IServiceContainer container; - if (Containers.TryGetValue(method.ReflectedType, out container)) - { - var scopeManager = container.ScopeManagerProvider.GetScopeManager(container); - if (scopeManager.CurrentScope != null) - { - scopeManager.CurrentScope.Dispose(); - } - } - } - - /// - /// Gets a list of argument data resolved using an instance. - /// - /// The test method currently being executed. - /// A list of argument data resolved using an instance. - public override IEnumerable GetData(MethodInfo methodUnderTest) - { - var container = GetContainer(methodUnderTest.ReflectedType); - ParameterInfo[] parameters = methodUnderTest.GetParameters(); - if (ShouldStartScope(methodUnderTest)) - { - container.BeginScope(); - } - - return ResolveParameters(container, parameters); - } - - /// - /// This method is only executed when the test app domains are unloaded. - /// - [ExcludeFromCodeCoverage] - private static void EndAllScopes() - { - foreach (var container in Containers.Values) - { - var scopeManager = container.ScopeManagerProvider.GetScopeManager(container); - while (scopeManager.CurrentScope != null) - { - container.Dispose(); - } - } - } - - private static bool ShouldStartScope(MethodInfo methodUnderTest) - { - return methodUnderTest.IsDefined(typeof(ScopedAttribute), true); - } - - private static IServiceContainer GetContainer(Type type) - { - return Containers.GetOrAdd(type, CreateContainer); - } - - private static IServiceContainer CreateContainer(Type type) - { - var container = new ServiceContainer(); - InvokeConfigureMethodIfPresent(type, container); - return container; - } - - private static object GetInstance(IServiceFactory factory, ParameterInfo parameter) - { - var instance = factory.TryGetInstance(parameter.ParameterType); - if (instance != null) - { - return instance; - } - - return factory.TryGetInstance(parameter.ParameterType, parameter.Name); - } - - private static void InvokeConfigureMethodIfPresent(Type type, IServiceContainer container) - { - var callSequence = new Stack(); - - while (type != typeof(object)) - { - var method = GetConfigureMethod(type); - if (method != null) - { - callSequence.Push(() => method.Invoke(null, new object[] { container })); - } - - type = type.BaseType; - } - - while (callSequence.Count > 0) - { - var action = callSequence.Pop(); - action(); - } - } - - private static MethodInfo GetConfigureMethod(Type type) - { - var composeMethod = type.GetMethod( - "Configure", - BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); - return composeMethod; - } - - private IEnumerable ResolveParameters(IServiceFactory factory, IEnumerable parameters) - { - return new[] { parameters.Select(p => ResolveParameter(factory, p)).ToArray() }; - } - - private object ResolveParameter(IServiceFactory factory, ParameterInfo parameter) - { - object instance; - try - { - instance = GetInstance(factory, parameter); - } - catch (InvalidOperationException exception) - { - const string errorMessage = "Unable to inject test method arguments. " - + "Create a static method in the test class with the following signature " - + "to configure the container: public static void Configure(IServiceContainer container)"; - throw new InvalidOperationException(errorMessage, exception); - } - - if (instance != null) - { - return instance; - } - - if (data.Count > 0) - { - return data.Pop(); - } - - throw new InvalidOperationException(string.Format("No value specified for parameter: {0}", parameter)); - } - } - - /// - /// Indicates that a new should be started for this test method. - /// - public class ScopedAttribute : BeforeAfterTestAttribute - { - /// - /// This method is called after the test method is executed. - /// - /// The method under test - public override void After(MethodInfo methodUnderTest) - { - InjectDataAttribute.EndScope(methodUnderTest); - } - } -} \ No newline at end of file diff --git a/src/LightInject.xUnit2_2/LightInject.xUnit2.csproj.DotSettings b/src/LightInject.xUnit2_2/LightInject.xUnit2.csproj.DotSettings deleted file mode 100644 index 662f956..0000000 --- a/src/LightInject.xUnit2_2/LightInject.xUnit2.csproj.DotSettings +++ /dev/null @@ -1,2 +0,0 @@ - - CSharp50 \ No newline at end of file diff --git a/src/LightInject.xUnit2_2/LightInject.xUnit2_2.csproj b/src/LightInject.xUnit2_2/LightInject.xUnit2_2.csproj deleted file mode 100644 index d6abc3d..0000000 --- a/src/LightInject.xUnit2_2/LightInject.xUnit2_2.csproj +++ /dev/null @@ -1,74 +0,0 @@ - - - - - Debug - AnyCPU - {245ABD3A-3FE2-480F-B4FF-6FC72AC11ACC} - Library - Properties - LightInject.xUnit2 - LightInject.xUnit2 - v4.6 - 512 - - - true - full - false - bin\Debug\ - TRACE;DEBUG;NET46 - prompt - 4 - bin\Debug\LightInject.xUnit2.XML - - - pdbonly - true - bin\Release\ - TRACE;NET46 - prompt - 4 - bin\Release\LightInject.xUnit2.XML - true - - - - - - - - - - - - - - - - - - - - - - 5.0.0 - - - 1.0.0 - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - 2.1.0 - - - - - \ No newline at end of file diff --git a/src/LightInject.xUnit2_2/NuGet/LightInject.Xunit2.Source.nuspec b/src/LightInject.xUnit2_2/NuGet/LightInject.Xunit2.Source.nuspec deleted file mode 100644 index a142cc6..0000000 --- a/src/LightInject.xUnit2_2/NuGet/LightInject.Xunit2.Source.nuspec +++ /dev/null @@ -1,26 +0,0 @@ - - - - LightInject.xUnit.Source - 2.1.0 - Bernhard Richter - Bernhard Richter - http://opensource.org/licenses/MIT - http://seesharper.github.io/LightInject/ - false - An extension to the LightInject service container that enables dependency injection in xUnit test methods. - http://www.lightinject.net/#whatsnew - Bernhard Richter - Ioc Dependency-Injection Inversion-of-Control LightInject UnitTesting Test xUnit - - - - - - - - - - diff --git a/src/LightInject.xUnit2_2/NuGet/LightInject.Xunit2.nuspec b/src/LightInject.xUnit2_2/NuGet/LightInject.Xunit2.nuspec deleted file mode 100644 index 1598e50..0000000 --- a/src/LightInject.xUnit2_2/NuGet/LightInject.Xunit2.nuspec +++ /dev/null @@ -1,20 +0,0 @@ - - - - LightInject.xUnit - 2.1.0 - Bernhard Richter - Bernhard Richter - http://opensource.org/licenses/MIT - http://seesharper.github.io/LightInject/ - false - An extension to the LightInject service container that enables dependency injection in xUnit test methods. - http://www.lightinject.net/#whatsnew - Bernhard Richter - Ioc Dependency-Injection Inversion-of-Control LightInject UnitTesting Test xUnit - - - - - - diff --git a/src/LightInject.xUnit2_2/Properties/AssemblyInfo.cs b/src/LightInject.xUnit2_2/Properties/AssemblyInfo.cs deleted file mode 100644 index 3598ee4..0000000 --- a/src/LightInject.xUnit2_2/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyTitle("LightInject.xUnit2")] -#if NET45 - [assembly: AssemblyProduct("LightInject.xUnit2 (NET45)")] -#endif -#if NET46 -[assembly: AssemblyProduct("LightInject.xUnit2 (NET46)")] -#endif -#if DNX451 - [assembly: AssemblyProduct("LightInject.xUnit2 (DNX451)")] -#endif -#if DNXCORE50 - [assembly: AssemblyProduct("LightInject.xUnit2 (DNXCORE50)")] -#endif -[assembly: AssemblyCopyright("Copyright © Bernhard Richter 2015")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("4.0.0")] -[assembly: AssemblyFileVersion("4.0.0")] -[assembly: AssemblyInformationalVersion("4.0.0")] -[module: System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1633:FileMustHaveHeader", Justification = "Custom header.")] diff --git a/src/LightInject.xUnit2_2/project.json_ b/src/LightInject.xUnit2_2/project.json_ deleted file mode 100644 index e4f7cea..0000000 --- a/src/LightInject.xUnit2_2/project.json_ +++ /dev/null @@ -1,31 +0,0 @@ -{ - "version": "3.0.0.10", - "dependencies": { - "LightInject" : "4.0.2", - "xunit.core" : "2.1.0" - }, - "frameworks": { - "dnx451" : - { - "dependencies": { - "System.Runtime" : "4.0.20" - } - }, - "dnxcore50": { - "dependencies": { - "System.Collections": "4.0.10", - "System.Collections.Concurrent": "4.0.10", - "System.IO": "4.0.10", - "System.Linq": "4.0.0", - "System.Reflection": "4.0.10", - "System.Reflection.Emit": "4.0.0", - "System.Reflection.Emit.Lightweight": "4.0.0", - "System.Runtime": "4.0.20", - "System.Runtime.Extensions": "4.0.10", - "System.Diagnostics.Tools": "4.0.0", - "System.Reflection.TypeExtensions": "4.0.0", - "System.Reflection.Extensions": "4.0.0" - } - } - } -} \ No newline at end of file diff --git a/src/MigrationBackup/b15c5e1f/LightInject.xUnit2.Tests_2/LightInject.xUnit2.Tests_2.csproj b/src/MigrationBackup/b15c5e1f/LightInject.xUnit2.Tests_2/LightInject.xUnit2.Tests_2.csproj deleted file mode 100644 index 61c995c..0000000 --- a/src/MigrationBackup/b15c5e1f/LightInject.xUnit2.Tests_2/LightInject.xUnit2.Tests_2.csproj +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - Debug - AnyCPU - {633CEBA8-AE04-40C8-86B5-BC5DBE22D0A0} - Library - Properties - LightInject.xUnit2.Tests - LightInject.xUnit2.Tests - v4.6 - 512 - - - - - true - full - false - bin\Debug\ - TRACE;DEBUG;NET46 - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE;NET46 - prompt - 4 - - - - ..\packages\LightInject.5.0.0\lib\net46\LightInject.dll - True - - - - - - - - - - - ..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll - True - - - ..\packages\xunit.assert.2.1.0\lib\dotnet\xunit.assert.dll - True - - - ..\packages\xunit.extensibility.core.2.1.0\lib\dotnet\xunit.core.dll - True - - - ..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll - True - - - - - - - - - - - - - - - {245abd3a-3fe2-480f-b4ff-6fc72ac11acc} - LightInject.xUnit2_2 - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - \ No newline at end of file diff --git a/src/MigrationBackup/b15c5e1f/LightInject.xUnit2.Tests_2/NuGetUpgradeLog.html b/src/MigrationBackup/b15c5e1f/LightInject.xUnit2.Tests_2/NuGetUpgradeLog.html deleted file mode 100644 index e9232a2..0000000 --- a/src/MigrationBackup/b15c5e1f/LightInject.xUnit2.Tests_2/NuGetUpgradeLog.html +++ /dev/null @@ -1,169 +0,0 @@ - - - - - NuGetMigrationLog -

- NuGet Migration Report - LightInject.xUnit2.Tests_2

Overview

Migration to PackageReference was completed successfully. Please build and run your solution to verify that all packages are available.
- If you run into any problems, have feedback, questions, or concerns, please - file an issue on the NuGet GitHub repository.

Packages processed

Top-level dependencies:

Package IdVersion
CoverageToXml - v1.0.0
LightInject - v5.0.0
ReportGenerator - v2.3.5
xunit - v2.1.0
xunit.runner.visualstudio - v2.1.0

Transitive dependencies:

Package IdVersion
xunit.abstractions - v2.0.0
xunit.assert - v2.1.0
xunit.core - v2.1.0
xunit.extensibility.core - v2.1.0
xunit.extensibility.execution - v2.1.0

Package compatibility issues

Description
- No issues were found. -
\ No newline at end of file diff --git a/src/MigrationBackup/b15c5e1f/LightInject.xUnit2.Tests_2/packages.config b/src/MigrationBackup/b15c5e1f/LightInject.xUnit2.Tests_2/packages.config deleted file mode 100644 index 710363d..0000000 --- a/src/MigrationBackup/b15c5e1f/LightInject.xUnit2.Tests_2/packages.config +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/MigrationBackup/e0a97129/LightInject.xUnit2_2/LightInject.xUnit2_2.csproj b/src/MigrationBackup/e0a97129/LightInject.xUnit2_2/LightInject.xUnit2_2.csproj deleted file mode 100644 index 4481261..0000000 --- a/src/MigrationBackup/e0a97129/LightInject.xUnit2_2/LightInject.xUnit2_2.csproj +++ /dev/null @@ -1,86 +0,0 @@ - - - - - Debug - AnyCPU - {245ABD3A-3FE2-480F-B4FF-6FC72AC11ACC} - Library - Properties - LightInject.xUnit2 - LightInject.xUnit2 - v4.6 - 512 - - - true - full - false - bin\Debug\ - TRACE;DEBUG;NET46 - prompt - 4 - bin\Debug\LightInject.xUnit2.XML - - - pdbonly - true - bin\Release\ - TRACE;NET46 - prompt - 4 - bin\Release\LightInject.xUnit2.XML - true - - - - ..\packages\LightInject.5.0.0\lib\net46\LightInject.dll - True - - - - - - - - - - - ..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll - False - True - - - ..\packages\xunit.extensibility.core.2.1.0\lib\dotnet\xunit.core.dll - False - True - - - ..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll - False - True - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/MigrationBackup/e0a97129/LightInject.xUnit2_2/NuGetUpgradeLog.html b/src/MigrationBackup/e0a97129/LightInject.xUnit2_2/NuGetUpgradeLog.html deleted file mode 100644 index 3423b79..0000000 --- a/src/MigrationBackup/e0a97129/LightInject.xUnit2_2/NuGetUpgradeLog.html +++ /dev/null @@ -1,165 +0,0 @@ - - - - - NuGetMigrationLog -

- NuGet Migration Report - LightInject.xUnit2_2

Overview

Migration to PackageReference was completed successfully. Please build and run your solution to verify that all packages are available.
- If you run into any problems, have feedback, questions, or concerns, please - file an issue on the NuGet GitHub repository.

Packages processed

Top-level dependencies:

Package IdVersion
LightInject - v5.0.0
StyleCop.Analyzers - v1.0.0
xunit.core - v2.1.0

Transitive dependencies:

Package IdVersion
xunit.abstractions - v2.0.0
xunit.extensibility.core - v2.1.0
xunit.extensibility.execution - v2.1.0

Package compatibility issues

Description
- No issues were found. -
\ No newline at end of file diff --git a/src/MigrationBackup/e0a97129/LightInject.xUnit2_2/packages.config b/src/MigrationBackup/e0a97129/LightInject.xUnit2_2/packages.config deleted file mode 100644 index 27c2412..0000000 --- a/src/MigrationBackup/e0a97129/LightInject.xUnit2_2/packages.config +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file