diff --git a/vNext/BetterModules.sln b/vNext/BetterModules.sln index 4d630b3..24e5f5b 100644 --- a/vNext/BetterModules.sln +++ b/vNext/BetterModules.sln @@ -36,6 +36,8 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "BetterModules.Core.Tests", EndProject Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "BetterModules.Sample.Web.Module", "src\BetterModules.Sample.Web.Module\BetterModules.Sample.Web.Module.xproj", "{AD8BA351-BC65-4894-B42F-9AC6618A2998}" EndProject +Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "BetterModules.Core.Web.Tests", "test\BetterModules.Core.Web.Tests\BetterModules.Core.Web.Tests.xproj", "{F6A470DD-63AB-4A65-9CC2-622BD2B9B372}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -66,6 +68,10 @@ Global {AD8BA351-BC65-4894-B42F-9AC6618A2998}.Debug|Any CPU.Build.0 = Debug|Any CPU {AD8BA351-BC65-4894-B42F-9AC6618A2998}.Release|Any CPU.ActiveCfg = Release|Any CPU {AD8BA351-BC65-4894-B42F-9AC6618A2998}.Release|Any CPU.Build.0 = Release|Any CPU + {F6A470DD-63AB-4A65-9CC2-622BD2B9B372}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F6A470DD-63AB-4A65-9CC2-622BD2B9B372}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F6A470DD-63AB-4A65-9CC2-622BD2B9B372}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F6A470DD-63AB-4A65-9CC2-622BD2B9B372}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -80,5 +86,6 @@ Global {431BEF5E-502D-4B21-B13C-6E917EACC532} = {E97ED681-48EA-4EF1-97F2-EE7E1EEC516B} {00B11517-DAEB-43AA-B826-B2AA545AE166} = {46ED6C76-1BCC-4177-9A67-492424080985} {AD8BA351-BC65-4894-B42F-9AC6618A2998} = {E97ED681-48EA-4EF1-97F2-EE7E1EEC516B} + {F6A470DD-63AB-4A65-9CC2-622BD2B9B372} = {46ED6C76-1BCC-4177-9A67-492424080985} EndGlobalSection EndGlobal diff --git a/vNext/src/BetterModules.Core.Web/BetterModules.Core.Web.xproj b/vNext/src/BetterModules.Core.Web/BetterModules.Core.Web.xproj index c113201..6a9f15f 100644 --- a/vNext/src/BetterModules.Core.Web/BetterModules.Core.Web.xproj +++ b/vNext/src/BetterModules.Core.Web/BetterModules.Core.Web.xproj @@ -4,7 +4,6 @@ 14.0 $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - d5dd9647-f622-4899-b6c6-3210ec7ac86b @@ -12,9 +11,11 @@ ..\..\artifacts\obj\$(MSBuildProjectName) ..\..\artifacts\bin\$(MSBuildProjectName)\ - 2.0 + + True + - + \ No newline at end of file diff --git a/vNext/src/BetterModules.Core/BetterModules.Core.xproj b/vNext/src/BetterModules.Core/BetterModules.Core.xproj index bf6cd84..215665e 100644 --- a/vNext/src/BetterModules.Core/BetterModules.Core.xproj +++ b/vNext/src/BetterModules.Core/BetterModules.Core.xproj @@ -15,7 +15,7 @@ 2.0 - False + True \ No newline at end of file diff --git a/vNext/src/BetterModules.Core/DataAccess/DataContext/Fetching/DefaultFetchingProvider.cs b/vNext/src/BetterModules.Core/DataAccess/DataContext/Fetching/DefaultFetchingProvider.cs deleted file mode 100644 index 9536e42..0000000 --- a/vNext/src/BetterModules.Core/DataAccess/DataContext/Fetching/DefaultFetchingProvider.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Linq.Expressions; -using NHibernate.Linq; - -namespace BetterModules.Core.DataAccess.DataContext.Fetching -{ - public class DefaultFetchingProvider : IFetchingProvider - { - public IFetchRequest Fetch(IQueryable query, Expression> relatedObjectSelector) - { - var fetch = EagerFetchingExtensionMethods.Fetch(query, relatedObjectSelector); - return new FetchRequest(fetch); - } - - public IFetchRequest FetchMany(IQueryable query, Expression>> relatedObjectSelector) - { - var fetch = EagerFetchingExtensionMethods.FetchMany(query, relatedObjectSelector); - return new FetchRequest(fetch); - } - - public IFetchRequest ThenFetch(IFetchRequest query, Expression> relatedObjectSelector) - { - var impl = query as FetchRequest; - var fetch = EagerFetchingExtensionMethods.ThenFetch(impl.NhFetchRequest, relatedObjectSelector); - return new FetchRequest(fetch); - } - - public IFetchRequest ThenFetchMany(IFetchRequest query, Expression>> relatedObjectSelector) - { - var impl = query as FetchRequest; - var fetch = EagerFetchingExtensionMethods.ThenFetchMany(impl.NhFetchRequest, relatedObjectSelector); - return new FetchRequest(fetch); - } - } -} diff --git a/vNext/src/BetterModules.Core/DataAccess/DataContext/Fetching/EagerFetch.cs b/vNext/src/BetterModules.Core/DataAccess/DataContext/Fetching/EagerFetch.cs index dff0d71..71214c3 100644 --- a/vNext/src/BetterModules.Core/DataAccess/DataContext/Fetching/EagerFetch.cs +++ b/vNext/src/BetterModules.Core/DataAccess/DataContext/Fetching/EagerFetch.cs @@ -2,37 +2,42 @@ using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; +using NHibernate.Linq; namespace BetterModules.Core.DataAccess.DataContext.Fetching { public static class EagerFetch { - private static IFetchingProvider FetchingProvider { get; } - public static IFetchRequest Fetch( this IQueryable query, Expression> relatedObjectSelector) { - return FetchingProvider.Fetch(query, relatedObjectSelector); + var fetch = EagerFetchingExtensionMethods.Fetch(query, relatedObjectSelector); + return new FetchRequest(fetch); } public static IFetchRequest FetchMany( this IQueryable query, Expression>> relatedObjectSelector) { - return FetchingProvider.FetchMany(query, relatedObjectSelector); + var fetch = EagerFetchingExtensionMethods.FetchMany(query, relatedObjectSelector); + return new FetchRequest(fetch); } public static IFetchRequest ThenFetch( this IFetchRequest query, Expression> relatedObjectSelector) { - return FetchingProvider.ThenFetch(query, relatedObjectSelector); + var impl = query as FetchRequest; + var fetch = impl.NhFetchRequest.ThenFetch(relatedObjectSelector); + return new FetchRequest(fetch); } public static IFetchRequest ThenFetchMany( this IFetchRequest query, Expression>> relatedObjectSelector) { - return FetchingProvider.ThenFetchMany(query, relatedObjectSelector); + var impl = query as FetchRequest; + var fetch = impl.NhFetchRequest.ThenFetchMany(relatedObjectSelector); + return new FetchRequest(fetch); } } -} +} \ No newline at end of file diff --git a/vNext/src/BetterModules.Core/DataAccess/DataContext/Fetching/FetchRequest.cs b/vNext/src/BetterModules.Core/DataAccess/DataContext/Fetching/FetchRequest.cs index e5fad1a..368bc01 100644 --- a/vNext/src/BetterModules.Core/DataAccess/DataContext/Fetching/FetchRequest.cs +++ b/vNext/src/BetterModules.Core/DataAccess/DataContext/Fetching/FetchRequest.cs @@ -10,43 +10,25 @@ public class FetchRequest : IFetchRequest { public IEnumerator GetEnumerator() { - return this.NhFetchRequest.GetEnumerator(); + return NhFetchRequest.GetEnumerator(); } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { - return this.NhFetchRequest.GetEnumerator(); + return NhFetchRequest.GetEnumerator(); } - public Type ElementType - { - get - { - return this.NhFetchRequest.ElementType; - } - } + public Type ElementType => NhFetchRequest.ElementType; - public Expression Expression - { - get - { - return this.NhFetchRequest.Expression; - } - } + public Expression Expression => NhFetchRequest.Expression; - public IQueryProvider Provider - { - get - { - return this.NhFetchRequest.Provider; - } - } + public IQueryProvider Provider => NhFetchRequest.Provider; public FetchRequest(INhFetchRequest nhFetchRequest) { - this.NhFetchRequest = nhFetchRequest; + NhFetchRequest = nhFetchRequest; } - public INhFetchRequest NhFetchRequest { get; private set; } + public INhFetchRequest NhFetchRequest { get; } } } diff --git a/vNext/src/BetterModules.Core/DataAccess/DataContext/Fetching/IFetchingProvider.cs b/vNext/src/BetterModules.Core/DataAccess/DataContext/Fetching/IFetchingProvider.cs deleted file mode 100644 index dfe1454..0000000 --- a/vNext/src/BetterModules.Core/DataAccess/DataContext/Fetching/IFetchingProvider.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Linq.Expressions; - -namespace BetterModules.Core.DataAccess.DataContext.Fetching -{ - public interface IFetchingProvider - { - IFetchRequest Fetch(IQueryable query, Expression> relatedObjectSelector); - - IFetchRequest FetchMany(IQueryable query, Expression>> relatedObjectSelector); - - IFetchRequest ThenFetch(IFetchRequest query, Expression> relatedObjectSelector); - - IFetchRequest ThenFetchMany(IFetchRequest query, Expression>> relatedObjectSelector); - } -} diff --git a/vNext/src/BetterModules.Core/Environment/Assemblies/DefaultAssemblyLoader.cs b/vNext/src/BetterModules.Core/Environment/Assemblies/DefaultAssemblyLoader.cs index fcd1178..2ea904d 100644 --- a/vNext/src/BetterModules.Core/Environment/Assemblies/DefaultAssemblyLoader.cs +++ b/vNext/src/BetterModules.Core/Environment/Assemblies/DefaultAssemblyLoader.cs @@ -4,6 +4,7 @@ using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Reflection; +using Microsoft.Dnx.Runtime; using Microsoft.Framework.Logging; namespace BetterModules.Core.Environment.Assemblies @@ -18,6 +19,8 @@ public class DefaultAssemblyLoader : IAssemblyLoader /// private readonly ILogger logger; + + /// /// Loaded assemblies container. /// diff --git a/vNext/src/BetterModules.Core/Extensions/BetterModulesCoreServiceCollectionExtensions.cs b/vNext/src/BetterModules.Core/Extensions/BetterModulesCoreServiceCollectionExtensions.cs index c4ee700..b563292 100644 --- a/vNext/src/BetterModules.Core/Extensions/BetterModulesCoreServiceCollectionExtensions.cs +++ b/vNext/src/BetterModules.Core/Extensions/BetterModulesCoreServiceCollectionExtensions.cs @@ -3,7 +3,6 @@ using BetterModules.Core.Configuration; using BetterModules.Core.DataAccess; using BetterModules.Core.DataAccess.DataContext; -using BetterModules.Core.DataAccess.DataContext.Fetching; using BetterModules.Core.DataAccess.DataContext.Migrations; using BetterModules.Core.Environment.Assemblies; using BetterModules.Core.Environment.FileSystem; @@ -48,7 +47,6 @@ public static void ConfigureDefaultServices(this IServiceCollection services) services.AddSingleton(); services.AddSingleton(); services.AddSingleton(); - services.AddSingleton(); services.AddSingleton(); services.AddSingleton(); services.AddSingleton(); diff --git a/vNext/src/BetterModules.Mvc6.Sandbox/Controllers/HomeController.cs b/vNext/src/BetterModules.Mvc6.Sandbox/Controllers/HomeController.cs index 302b2e1..5ed7ca6 100644 --- a/vNext/src/BetterModules.Mvc6.Sandbox/Controllers/HomeController.cs +++ b/vNext/src/BetterModules.Mvc6.Sandbox/Controllers/HomeController.cs @@ -1,4 +1,5 @@ -using BetterModules.Sample.Module.Models; +using System; +using BetterModules.Sample.Module.Models; using Microsoft.AspNet.Http; using Microsoft.AspNet.Mvc; @@ -16,6 +17,7 @@ public HomeController(ICalculator calculator) public IActionResult Index() { var result = _calculator.FindRoots(1, 4, 4); + var path = Environment.CurrentDirectory; return View(); } } diff --git a/vNext/test/BetterModules.Core.Tests/DataAccess/DataContext/Fetching/EagerFetchTests.cs b/vNext/test/BetterModules.Core.Tests/DataAccess/DataContext/Fetching/EagerFetchTests.cs deleted file mode 100644 index 205eb94..0000000 --- a/vNext/test/BetterModules.Core.Tests/DataAccess/DataContext/Fetching/EagerFetchTests.cs +++ /dev/null @@ -1,183 +0,0 @@ -//using System; -//using System.Collections.Generic; -//using System.Linq; -//using System.Linq.Expressions; - -//using BetterModules.Core.DataAccess.DataContext.Fetching; -//using BetterModules.Core.Tests.TestHelpers; - -//using Moq; - -//using NUnit.Framework; -//using Xunit; - -//namespace BetterModules.Core.Tests.DataAccess.DataContext.Fetching -//{ -// [TestFixture] -// public class EagerFetchTests : TestBase -// { -// private static IQueryable originalQuery = new List -// { -// new TestModel {Name = "Test1"}, -// new TestModel {Name = "Test2"}, -// }.AsQueryable(); - -// [Fact] -// public void Should_Call_Fetch_Successfully() -// { -// using (var fakeProvider = new ContextScopeProviderHelper()) -// { -// var provider = GetProviderMock(); -// fakeProvider.RegisterFakeServiceInstance(provider, typeof(IFetchingProvider)); - -// var result = originalQuery.Fetch(s => s.Parent); - -// Assert.NotNull(result); -// Assert.Equal(result.Count(), 1); -// Assert.True(result.Any(r => r.Name == "Fetch_Result")); -// } -// } - -// [Fact] -// public void Should_Call_FetchMany_Successfully() -// { -// using (var fakeProvider = new ContextScopeProviderHelper()) -// { -// var provider = GetProviderMock(); -// fakeProvider.RegisterFakeServiceInstance(provider, typeof(IFetchingProvider)); - -// var result = originalQuery.FetchMany(s => s.Children); - -// Assert.NotNull(result); -// Assert.Equal(result.Count(), 1); -// Assert.True(result.Any(r => r.Name == "FetchMany_Result")); -// } -// } - -// [Fact] -// public void Should_Call_ThenFetch_Successfully() -// { -// using (var fakeProvider = new ContextScopeProviderHelper()) -// { -// var provider = GetProviderMock(); -// fakeProvider.RegisterFakeServiceInstance(provider, typeof(IFetchingProvider)); - -// var result = originalQuery.Fetch(s => s.Parent).ThenFetch(s => s.Parent); - -// Assert.NotNull(result); -// Assert.Equal(result.Count(), 1); -// Assert.True(result.Any(r => r.Name == "ThenFetch_Result")); -// } -// } - -// [Fact] -// public void Should_Call_ThenFetchMany_Successfully() -// { -// using (var fakeProvider = new ContextScopeProviderHelper()) -// { -// var provider = GetProviderMock(); -// fakeProvider.RegisterFakeServiceInstance(provider, typeof(IFetchingProvider)); - -// var result = originalQuery.FetchMany(s => s.Children).ThenFetchMany(s => s.Children); - -// Assert.NotNull(result); -// Assert.Equal(result.Count(), 1); -// Assert.True(result.Any(r => r.Name == "ThenFetchMany_Result")); -// } -// } - -// private IFetchingProvider GetProviderMock() -// { -// var provider = new Mock(); -// provider -// .Setup(p => p.Fetch(It.IsAny>(), It.IsAny>>())) -// .Returns, Expression>>((query, expression) => -// { -// Assert.Equal(query, originalQuery); - -// var result = new List {new TestModel {Name = "Fetch_Result"}}.AsQueryable(); -// return new FetchRequestTest(result); -// }); - -// provider -// .Setup(p => p.ThenFetch(It.IsAny>(), It.IsAny>>())) -// .Returns, Expression>>((query, expression) => -// { -// Assert.NotNull(query); -// Assert.Equal(query.Count(), 1); -// Assert.True(query.Any(r => r.Name == "Fetch_Result")); - -// var result = new List {new TestModel {Name = "ThenFetch_Result"}}.AsQueryable(); -// return new FetchRequestTest(result); -// }); - -// provider -// .Setup(p => p.FetchMany(It.IsAny>(), It.IsAny>>>())) -// .Returns, Expression>>>((query, expression) => -// { -// Assert.Equal(query, originalQuery); - -// var result = new List {new TestModel {Name = "FetchMany_Result"}}.AsQueryable(); -// return new FetchRequestTest(result); -// }); - -// provider -// .Setup(p => p.ThenFetchMany(It.IsAny>(), It.IsAny>>>())) -// .Returns, Expression>>>((query, expression) => -// { -// Assert.NotNull(query); -// Assert.Equal(query.Count(), 1); -// Assert.True(query.Any(r => r.Name == "FetchMany_Result")); - -// var result = new List {new TestModel {Name = "ThenFetchMany_Result"}}.AsQueryable(); -// return new FetchRequestTest(result); -// }); - -// return provider.Object; -// } - -// private class TestModel -// { -// public string Name { get; set; } - -// public TestModel Parent { get; set; } - -// public IEnumerable Children { get; set; } -// } - -// private class FetchRequestTest : IFetchRequest -// { -// public readonly IQueryable query; - -// public IEnumerator GetEnumerator() -// { -// return query.GetEnumerator(); -// } - -// System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() -// { -// return query.GetEnumerator(); -// } - -// public Type ElementType -// { -// get { return query.ElementType; } -// } - -// public Expression Expression -// { -// get { return query.Expression; } -// } - -// public IQueryProvider Provider -// { -// get { return query.Provider; } -// } - -// public FetchRequestTest(IQueryable query) -// { -// this.query = query; -// } -// } -// } -//} diff --git a/vNext/test/BetterModules.Core.Tests/Environment/Assemblies/DefaultAssemblyLoaderTests.cs b/vNext/test/BetterModules.Core.Tests/Environment/Assemblies/DefaultAssemblyLoaderTests.cs index ba5dda6..db92b67 100644 --- a/vNext/test/BetterModules.Core.Tests/Environment/Assemblies/DefaultAssemblyLoaderTests.cs +++ b/vNext/test/BetterModules.Core.Tests/Environment/Assemblies/DefaultAssemblyLoaderTests.cs @@ -1,60 +1,60 @@ -using System.Linq; -using System.Reflection; -using BetterModules.Core.Environment.Assemblies; -using Microsoft.Framework.Logging; -using Xunit; - -namespace BetterModules.Core.Tests.Environment.Assemblies -{ - public class DefaultAssemblyLoaderTests - { - [Fact] - public void ShouldLoad_Assembly_FileByStringName() - { - var loader = new DefaultAssemblyLoader(new LoggerFactory()); - var assembly = loader.LoadFromFile("BetterModules.Sample.Module.dll"); - - Assert.NotNull(assembly); - Assert.True(assembly.FullName.StartsWith("BetterModules.Sample.Module")); - } - - [Fact] - public void ShouldLoad_Assembly_FileByAssemblyName() - { - var loader = new DefaultAssemblyLoader(new LoggerFactory()); - var assemblyName = AssemblyName.GetAssemblyName("BetterModules.Sample.Module.dll"); - var assembly = loader.Load(assemblyName); - - Assert.NotNull(assembly); - Assert.True(assembly.FullName.StartsWith("BetterModules.Sample.Module")); - } - - [Fact] - public void ShouldLoad_Assembly_GetLoadableTypes() - { - var type = GetType(); - var assembly = type.Assembly; - var loader = new DefaultAssemblyLoader(new LoggerFactory()); - var types = loader.GetLoadableTypes(assembly); - - Assert.NotNull(types); - Assert.True(types.Any()); - Assert.True(types.Contains(GetType())); - } - - //[Fact] - //public void ShouldLoad_Assembly_GetLoadableTypes_Generic() - //{ - // var type = GetType(); - // var assembly = type.Assembly; - // var loader = new DefaultAssemblyLoader(new LoggerFactory()); - // var testBaseType = typeof(TestBase); - // var types = loader.GetLoadableTypes(assembly, testBaseType); - - // Assert.NotNull(types); - // Assert.Greater(types.Count(), 1); - // Assert.True(types.Contains(GetType())); - // Assert.True(types.All(testBaseType.IsAssignableFrom)); - //} - } -} +//using System.Linq; +//using System.Reflection; +//using BetterModules.Core.Environment.Assemblies; +//using Microsoft.Framework.Logging; +//using Xunit; + +//namespace BetterModules.Core.Tests.Environment.Assemblies +//{ +// public class DefaultAssemblyLoaderTests +// { +// [Fact] +// public void ShouldLoad_Assembly_FileByStringName() +// { +// var loader = new DefaultAssemblyLoader(new LoggerFactory()); +// var assembly = loader.LoadFromFile("BetterModules.Sample.Module.dll"); + +// Assert.NotNull(assembly); +// Assert.True(assembly.FullName.StartsWith("BetterModules.Sample.Module")); +// } + +// [Fact] +// public void ShouldLoad_Assembly_FileByAssemblyName() +// { +// var loader = new DefaultAssemblyLoader(new LoggerFactory()); +// var assemblyName = AssemblyName.GetAssemblyName("BetterModules.Sample.Module.dll"); +// var assembly = loader.Load(assemblyName); + +// Assert.NotNull(assembly); +// Assert.True(assembly.FullName.StartsWith("BetterModules.Sample.Module")); +// } + +// [Fact] +// public void ShouldLoad_Assembly_GetLoadableTypes() +// { +// var type = GetType(); +// var assembly = type.Assembly; +// var loader = new DefaultAssemblyLoader(new LoggerFactory()); +// var types = loader.GetLoadableTypes(assembly); + +// Assert.NotNull(types); +// Assert.True(types.Count() > 1); +// Assert.True(types.Contains(GetType())); +// } + +// //[Fact] +// //public void ShouldLoad_Assembly_GetLoadableTypes_Generic() +// //{ +// // var type = GetType(); +// // var assembly = type.Assembly; +// // var loader = new DefaultAssemblyLoader(new LoggerFactory()); +// // var testBaseType = typeof(TestBase); +// // var types = loader.GetLoadableTypes(assembly, testBaseType); + +// // Assert.NotNull(types); +// // Assert.Greater(types.Count(), 1); +// // Assert.True(types.Contains(GetType())); +// // Assert.True(types.All(testBaseType.IsAssignableFrom)); +// //} +// } +//} diff --git a/vNext/test/BetterModules.Core.Tests/Environment/Assemblies/DefaultAssemblyManagerTests.cs b/vNext/test/BetterModules.Core.Tests/Environment/Assemblies/DefaultAssemblyManagerTests.cs index a84b2f1..df666ef 100644 --- a/vNext/test/BetterModules.Core.Tests/Environment/Assemblies/DefaultAssemblyManagerTests.cs +++ b/vNext/test/BetterModules.Core.Tests/Environment/Assemblies/DefaultAssemblyManagerTests.cs @@ -40,6 +40,20 @@ public void ShouldAddReferencedModulesCorrectly() } }); + libraryManegerMock + .Setup(r => r.GetReferencingLibraries("BetterModules.Core")) + .Returns(new List + { + new Library( + "BetterModules.Sample.Module", + "1.0.0", "", "", + new List { "BetterModules.Core" }, + new List + { + new AssemblyName("BetterModules.Sample.Module") + }) + }); + var manager = new DefaultAssemblyManager(workingDirectoryMock.Object, registrationMock.Object, assemblyLoaderMock.Object, libraryManegerMock.Object, new LoggerFactory()); manager.AddReferencedModules(); diff --git a/vNext/test/BetterModules.Core.Web.Tests/BetterModules.Core.Web.Tests.xproj b/vNext/test/BetterModules.Core.Web.Tests/BetterModules.Core.Web.Tests.xproj new file mode 100644 index 0000000..715a551 --- /dev/null +++ b/vNext/test/BetterModules.Core.Web.Tests/BetterModules.Core.Web.Tests.xproj @@ -0,0 +1,20 @@ + + + + 14.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + + f6a470dd-63ab-4a65-9cc2-622bd2b9b372 + BetterModules.Core.Web.Tests + ..\..\artifacts\obj\$(MSBuildProjectName) + ..\..\artifacts\bin\$(MSBuildProjectName)\ + + + + 2.0 + + + diff --git a/BetterModules.Core.Web.Tests/Models/ComboWireJsonTests.cs b/vNext/test/BetterModules.Core.Web.Tests/Models/ComboWireJsonTests.cs similarity index 100% rename from BetterModules.Core.Web.Tests/Models/ComboWireJsonTests.cs rename to vNext/test/BetterModules.Core.Web.Tests/Models/ComboWireJsonTests.cs diff --git a/BetterModules.Core.Web.Tests/Models/UserMessagesTests.cs b/vNext/test/BetterModules.Core.Web.Tests/Models/UserMessagesTests.cs similarity index 100% rename from BetterModules.Core.Web.Tests/Models/UserMessagesTests.cs rename to vNext/test/BetterModules.Core.Web.Tests/Models/UserMessagesTests.cs diff --git a/BetterModules.Core.Web.Tests/Models/WireJsonTests.cs b/vNext/test/BetterModules.Core.Web.Tests/Models/WireJsonTests.cs similarity index 100% rename from BetterModules.Core.Web.Tests/Models/WireJsonTests.cs rename to vNext/test/BetterModules.Core.Web.Tests/Models/WireJsonTests.cs diff --git a/BetterModules.Core.Web.Tests/Modules/Registration/DefaultWebModulesRegistrationTests.cs b/vNext/test/BetterModules.Core.Web.Tests/Modules/Registration/DefaultWebModulesRegistrationTests.cs similarity index 100% rename from BetterModules.Core.Web.Tests/Modules/Registration/DefaultWebModulesRegistrationTests.cs rename to vNext/test/BetterModules.Core.Web.Tests/Modules/Registration/DefaultWebModulesRegistrationTests.cs diff --git a/BetterModules.Core.Web.Tests/Modules/Registration/WebModuleRegistrationContextTests.cs b/vNext/test/BetterModules.Core.Web.Tests/Modules/Registration/WebModuleRegistrationContextTests.cs similarity index 100% rename from BetterModules.Core.Web.Tests/Modules/Registration/WebModuleRegistrationContextTests.cs rename to vNext/test/BetterModules.Core.Web.Tests/Modules/Registration/WebModuleRegistrationContextTests.cs diff --git a/BetterModules.Core.Web.Tests/Modules/WebModuleDescriptorTests.cs b/vNext/test/BetterModules.Core.Web.Tests/Modules/WebModuleDescriptorTests.cs similarity index 100% rename from BetterModules.Core.Web.Tests/Modules/WebModuleDescriptorTests.cs rename to vNext/test/BetterModules.Core.Web.Tests/Modules/WebModuleDescriptorTests.cs diff --git a/BetterModules.Core.Web.Tests/Mvc/Commands/DefaultCommandResolverTests.cs b/vNext/test/BetterModules.Core.Web.Tests/Mvc/Commands/DefaultCommandResolverTests.cs similarity index 100% rename from BetterModules.Core.Web.Tests/Mvc/Commands/DefaultCommandResolverTests.cs rename to vNext/test/BetterModules.Core.Web.Tests/Mvc/Commands/DefaultCommandResolverTests.cs diff --git a/BetterModules.Core.Web.Tests/Mvc/CoreControllerBaseTests.cs b/vNext/test/BetterModules.Core.Web.Tests/Mvc/CoreControllerBaseTests.cs similarity index 100% rename from BetterModules.Core.Web.Tests/Mvc/CoreControllerBaseTests.cs rename to vNext/test/BetterModules.Core.Web.Tests/Mvc/CoreControllerBaseTests.cs diff --git a/BetterModules.Core.Web.Tests/Mvc/Extensions/DefaultControllerExtensionsTests.cs b/vNext/test/BetterModules.Core.Web.Tests/Mvc/Extensions/DefaultControllerExtensionsTests.cs similarity index 100% rename from BetterModules.Core.Web.Tests/Mvc/Extensions/DefaultControllerExtensionsTests.cs rename to vNext/test/BetterModules.Core.Web.Tests/Mvc/Extensions/DefaultControllerExtensionsTests.cs diff --git a/BetterModules.Core.Web.Tests/Mvc/Extensions/VirtualPathTests.cs b/vNext/test/BetterModules.Core.Web.Tests/Mvc/Extensions/VirtualPathTests.cs similarity index 100% rename from BetterModules.Core.Web.Tests/Mvc/Extensions/VirtualPathTests.cs rename to vNext/test/BetterModules.Core.Web.Tests/Mvc/Extensions/VirtualPathTests.cs diff --git a/BetterModules.Core.Web.Tests/Mvc/Routes/DefaultRouteTableTests.cs b/vNext/test/BetterModules.Core.Web.Tests/Mvc/Routes/DefaultRouteTableTests.cs similarity index 100% rename from BetterModules.Core.Web.Tests/Mvc/Routes/DefaultRouteTableTests.cs rename to vNext/test/BetterModules.Core.Web.Tests/Mvc/Routes/DefaultRouteTableTests.cs diff --git a/BetterModules.Core.Web.Tests/Mvc/Routes/RouteExtensionsTests.cs b/vNext/test/BetterModules.Core.Web.Tests/Mvc/Routes/RouteExtensionsTests.cs similarity index 100% rename from BetterModules.Core.Web.Tests/Mvc/Routes/RouteExtensionsTests.cs rename to vNext/test/BetterModules.Core.Web.Tests/Mvc/Routes/RouteExtensionsTests.cs diff --git a/BetterModules.Core.Web.Tests/Properties/AssemblyInfo.cs b/vNext/test/BetterModules.Core.Web.Tests/Properties/AssemblyInfo.cs similarity index 100% rename from BetterModules.Core.Web.Tests/Properties/AssemblyInfo.cs rename to vNext/test/BetterModules.Core.Web.Tests/Properties/AssemblyInfo.cs diff --git a/BetterModules.Core.Web.Tests/Security/DefaultWebPrincipalProviderTests.cs b/vNext/test/BetterModules.Core.Web.Tests/Security/DefaultWebPrincipalProviderTests.cs similarity index 100% rename from BetterModules.Core.Web.Tests/Security/DefaultWebPrincipalProviderTests.cs rename to vNext/test/BetterModules.Core.Web.Tests/Security/DefaultWebPrincipalProviderTests.cs diff --git a/BetterModules.Core.Web.Tests/Services/Caching/HttpRuntimeCacheServiceTests.cs b/vNext/test/BetterModules.Core.Web.Tests/Services/Caching/HttpRuntimeCacheServiceTests.cs similarity index 100% rename from BetterModules.Core.Web.Tests/Services/Caching/HttpRuntimeCacheServiceTests.cs rename to vNext/test/BetterModules.Core.Web.Tests/Services/Caching/HttpRuntimeCacheServiceTests.cs diff --git a/BetterModules.Core.Web.Tests/TestHelpers/ContextScopeProviderHelper.cs b/vNext/test/BetterModules.Core.Web.Tests/TestHelpers/ContextScopeProviderHelper.cs similarity index 100% rename from BetterModules.Core.Web.Tests/TestHelpers/ContextScopeProviderHelper.cs rename to vNext/test/BetterModules.Core.Web.Tests/TestHelpers/ContextScopeProviderHelper.cs diff --git a/BetterModules.Core.Web.Tests/TestHelpers/HttpContextMoq.cs b/vNext/test/BetterModules.Core.Web.Tests/TestHelpers/HttpContextMoq.cs similarity index 100% rename from BetterModules.Core.Web.Tests/TestHelpers/HttpContextMoq.cs rename to vNext/test/BetterModules.Core.Web.Tests/TestHelpers/HttpContextMoq.cs diff --git a/BetterModules.Core.Web.Tests/TestHelpers/RandomTestDataProvider.cs b/vNext/test/BetterModules.Core.Web.Tests/TestHelpers/RandomTestDataProvider.cs similarity index 100% rename from BetterModules.Core.Web.Tests/TestHelpers/RandomTestDataProvider.cs rename to vNext/test/BetterModules.Core.Web.Tests/TestHelpers/RandomTestDataProvider.cs diff --git a/BetterModules.Core.Web.Tests/Web/DefaultHttpContextAccessorTests.cs b/vNext/test/BetterModules.Core.Web.Tests/Web/DefaultHttpContextAccessorTests.cs similarity index 100% rename from BetterModules.Core.Web.Tests/Web/DefaultHttpContextAccessorTests.cs rename to vNext/test/BetterModules.Core.Web.Tests/Web/DefaultHttpContextAccessorTests.cs diff --git a/vNext/test/BetterModules.Core.Web.Tests/project.json b/vNext/test/BetterModules.Core.Web.Tests/project.json new file mode 100644 index 0000000..c3269c3 --- /dev/null +++ b/vNext/test/BetterModules.Core.Web.Tests/project.json @@ -0,0 +1,24 @@ +{ + "version": "1.0.0-*", + "description": "BetterModules.Core.Web.Tests Class Library", + "authors": [ "user" ], + "tags": [ "" ], + "projectUrl": "", + "licenseUrl": "", + + "dependencies": { + "xunit": "2.1.0", + "xunit.runner.dnx": "2.1.0-beta5a-build188", + "BetterModules.Core.Web": "1.0.0-*", + "BetterModules.Sample.Web.Module": "1.0.0-*", + "Moq": "4.2.1506.2515" + }, + + "commands": { + "test": "xunit.runner.dnx" + }, + + "frameworks": { + "dnx451": { } + } +}