From 86bc25677899eb6548c696a47ef1bee53f6f2ee0 Mon Sep 17 00:00:00 2001 From: Jake Ginnivan Date: Sat, 28 Sep 2013 20:57:20 +0100 Subject: [PATCH 1/2] Removed v1 and moved sample projects into a physical folder to match the solution folder --- ConventionTests.sln | 30 ++-- ConventionTests/ConventionTests.NUnit.nuspec | 18 --- ConventionTests/ConventionTests.csproj | 108 --------------- .../ConventionTests.csproj.DotSettings | 3 - .../ConventionTests.ncrunchproject | 22 --- .../Internal/AssemblyProjectLocator.cs | 55 -------- .../Internal/ConventionData.Generic.cs | 85 ------------ .../Conventions/Internal/ConventionData.cs | 86 ------------ .../Internal/ConventionTest.Generic.cs | 56 -------- .../Conventions/Internal/ConventionTest.cs | 78 ----------- .../Internal/ConventionTestBase.cs | 30 ---- .../Internal/ConventionTestNamer.cs | 20 --- .../Conventions/Internal/IAssert.cs | 8 -- .../Conventions/Internal/IConventionTest.cs | 8 -- .../Conventions/Internal/IProjectLocator.cs | 7 - .../Internal/ProjectConventionData.cs | 24 ---- .../Internal/ProjectConvetionTest.cs | 16 --- .../Internal/ReflectionExtensions.cs | 70 ---------- .../Internal/WindsorConventionData.cs | 86 ------------ .../Internal/WindsorConventionTest.cs | 129 ------------------ ConventionTests/Conventions/__Run.cs | 57 -------- ConventionTests/Properties/AssemblyInfo.cs | 39 ------ ConventionTests/packages.config | 8 -- .../SampleApp.Tests}/DomainTests.cs | 0 .../SampleApp.Tests}/DtoTests.cs | 0 .../SampleApp.Tests}/MvcTests.cs | 0 .../Properties/AssemblyInfo.cs | 0 .../SampleApp.Tests}/SampleApp.Tests.csproj | 2 +- .../SampleApp.Tests.ncrunchproject | 0 .../SampleApp.Tests}/SqlScriptTests.cs | 0 .../SampleApp.Tests}/WebApiTests.cs | 0 .../SampleApp.Tests}/WpfTests.cs | 0 .../SampleApp.Tests}/__TryItOut__.txt | 0 .../SampleApp.Tests}/packages.config | 0 .../SampleApp}/Domain/DomainClass.cs | 0 .../SampleApp}/Dtos/SomeDto.cs | 0 .../SampleApp}/Mvc/TestController.cs | 0 .../SampleApp}/Properties/Annotations.cs | 0 .../SampleApp}/Properties/AssemblyInfo.cs | 0 .../SampleApp}/SampleApp.csproj | 0 .../SampleApp}/SampleApp.ncrunchproject | 0 .../SampleApp}/SqlScripts/Script0001.sql | 0 .../SampleApp}/WebApi/TestApiController.cs | 0 .../SampleApp}/Wpf/SomeView.xaml | 0 .../SampleApp}/Wpf/SomeView.xaml.cs | 0 .../SampleApp}/Wpf/SomeViewModel.cs | 0 .../SampleApp}/Wpf/ViewModelBase.cs | 0 .../SampleApp}/packages.config | 0 48 files changed, 13 insertions(+), 1032 deletions(-) delete mode 100644 ConventionTests/ConventionTests.NUnit.nuspec delete mode 100644 ConventionTests/ConventionTests.csproj delete mode 100644 ConventionTests/ConventionTests.csproj.DotSettings delete mode 100644 ConventionTests/ConventionTests.ncrunchproject delete mode 100644 ConventionTests/Conventions/Internal/AssemblyProjectLocator.cs delete mode 100644 ConventionTests/Conventions/Internal/ConventionData.Generic.cs delete mode 100644 ConventionTests/Conventions/Internal/ConventionData.cs delete mode 100644 ConventionTests/Conventions/Internal/ConventionTest.Generic.cs delete mode 100644 ConventionTests/Conventions/Internal/ConventionTest.cs delete mode 100644 ConventionTests/Conventions/Internal/ConventionTestBase.cs delete mode 100644 ConventionTests/Conventions/Internal/ConventionTestNamer.cs delete mode 100644 ConventionTests/Conventions/Internal/IAssert.cs delete mode 100644 ConventionTests/Conventions/Internal/IConventionTest.cs delete mode 100644 ConventionTests/Conventions/Internal/IProjectLocator.cs delete mode 100644 ConventionTests/Conventions/Internal/ProjectConventionData.cs delete mode 100644 ConventionTests/Conventions/Internal/ProjectConvetionTest.cs delete mode 100644 ConventionTests/Conventions/Internal/ReflectionExtensions.cs delete mode 100644 ConventionTests/Conventions/Internal/WindsorConventionData.cs delete mode 100644 ConventionTests/Conventions/Internal/WindsorConventionTest.cs delete mode 100644 ConventionTests/Conventions/__Run.cs delete mode 100644 ConventionTests/Properties/AssemblyInfo.cs delete mode 100644 ConventionTests/packages.config rename {SampleApp.Tests => Samples/SampleApp.Tests}/DomainTests.cs (100%) rename {SampleApp.Tests => Samples/SampleApp.Tests}/DtoTests.cs (100%) rename {SampleApp.Tests => Samples/SampleApp.Tests}/MvcTests.cs (100%) rename {SampleApp.Tests => Samples/SampleApp.Tests}/Properties/AssemblyInfo.cs (100%) rename {SampleApp.Tests => Samples/SampleApp.Tests}/SampleApp.Tests.csproj (96%) rename {SampleApp.Tests => Samples/SampleApp.Tests}/SampleApp.Tests.ncrunchproject (100%) rename {SampleApp.Tests => Samples/SampleApp.Tests}/SqlScriptTests.cs (100%) rename {SampleApp.Tests => Samples/SampleApp.Tests}/WebApiTests.cs (100%) rename {SampleApp.Tests => Samples/SampleApp.Tests}/WpfTests.cs (100%) rename {SampleApp.Tests => Samples/SampleApp.Tests}/__TryItOut__.txt (100%) rename {SampleApp.Tests => Samples/SampleApp.Tests}/packages.config (100%) rename {SampleApp => Samples/SampleApp}/Domain/DomainClass.cs (100%) rename {SampleApp => Samples/SampleApp}/Dtos/SomeDto.cs (100%) rename {SampleApp => Samples/SampleApp}/Mvc/TestController.cs (100%) rename {SampleApp => Samples/SampleApp}/Properties/Annotations.cs (100%) rename {SampleApp => Samples/SampleApp}/Properties/AssemblyInfo.cs (100%) rename {SampleApp => Samples/SampleApp}/SampleApp.csproj (100%) rename {SampleApp => Samples/SampleApp}/SampleApp.ncrunchproject (100%) rename {SampleApp => Samples/SampleApp}/SqlScripts/Script0001.sql (100%) rename {SampleApp => Samples/SampleApp}/WebApi/TestApiController.cs (100%) rename {SampleApp => Samples/SampleApp}/Wpf/SomeView.xaml (100%) rename {SampleApp => Samples/SampleApp}/Wpf/SomeView.xaml.cs (100%) rename {SampleApp => Samples/SampleApp}/Wpf/SomeViewModel.cs (100%) rename {SampleApp => Samples/SampleApp}/Wpf/ViewModelBase.cs (100%) rename {SampleApp => Samples/SampleApp}/packages.config (100%) diff --git a/ConventionTests.sln b/ConventionTests.sln index e743688..d2bab24 100644 --- a/ConventionTests.sln +++ b/ConventionTests.sln @@ -3,8 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 VisualStudioVersion = 12.0.20827.3 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConventionTests", "ConventionTests\ConventionTests.csproj", "{1E12EA0C-9182-4029-991A-B0B9D38F5783}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{AF9054EE-FE89-47A4-9156-BE54A837F2F7}" ProjectSection(SolutionItems) = preProject Build.cmd = Build.cmd @@ -25,11 +23,11 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestAssembly", "TestAssembl EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{E971721A-1271-4359-8F76-9FF17C29582B}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleApp.Tests", "SampleApp.Tests\SampleApp.Tests.csproj", "{8FEF48A8-6FF5-4B65-B84A-6690D735C703}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestStack.ConventionTests.Autofac", "TestStack.ConventionTests.Autofac\TestStack.ConventionTests.Autofac.csproj", "{A747FD64-5338-4572-879D-A9DEB00EBD56}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleApp", "SampleApp\SampleApp.csproj", "{56467A5A-7DD6-45B3-A84C-144A3C5D0C7A}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleApp", "Samples\SampleApp\SampleApp.csproj", "{56467A5A-7DD6-45B3-A84C-144A3C5D0C7A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestStack.ConventionTests.Autofac", "TestStack.ConventionTests.Autofac\TestStack.ConventionTests.Autofac.csproj", "{A747FD64-5338-4572-879D-A9DEB00EBD56}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleApp.Tests", "Samples\SampleApp.Tests\SampleApp.Tests.csproj", "{8FEF48A8-6FF5-4B65-B84A-6690D735C703}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -37,10 +35,6 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {1E12EA0C-9182-4029-991A-B0B9D38F5783}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1E12EA0C-9182-4029-991A-B0B9D38F5783}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1E12EA0C-9182-4029-991A-B0B9D38F5783}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1E12EA0C-9182-4029-991A-B0B9D38F5783}.Release|Any CPU.Build.0 = Release|Any CPU {955B0236-089F-434D-BA02-63A1E24C2B7C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {955B0236-089F-434D-BA02-63A1E24C2B7C}.Debug|Any CPU.Build.0 = Debug|Any CPU {955B0236-089F-434D-BA02-63A1E24C2B7C}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -53,24 +47,24 @@ Global {D5A0D078-C660-4654-8A14-DDC816BEBC54}.Debug|Any CPU.Build.0 = Debug|Any CPU {D5A0D078-C660-4654-8A14-DDC816BEBC54}.Release|Any CPU.ActiveCfg = Release|Any CPU {D5A0D078-C660-4654-8A14-DDC816BEBC54}.Release|Any CPU.Build.0 = Release|Any CPU - {8FEF48A8-6FF5-4B65-B84A-6690D735C703}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8FEF48A8-6FF5-4B65-B84A-6690D735C703}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8FEF48A8-6FF5-4B65-B84A-6690D735C703}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8FEF48A8-6FF5-4B65-B84A-6690D735C703}.Release|Any CPU.Build.0 = Release|Any CPU - {56467A5A-7DD6-45B3-A84C-144A3C5D0C7A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {56467A5A-7DD6-45B3-A84C-144A3C5D0C7A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {56467A5A-7DD6-45B3-A84C-144A3C5D0C7A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {56467A5A-7DD6-45B3-A84C-144A3C5D0C7A}.Release|Any CPU.Build.0 = Release|Any CPU {A747FD64-5338-4572-879D-A9DEB00EBD56}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A747FD64-5338-4572-879D-A9DEB00EBD56}.Debug|Any CPU.Build.0 = Debug|Any CPU {A747FD64-5338-4572-879D-A9DEB00EBD56}.Release|Any CPU.ActiveCfg = Release|Any CPU {A747FD64-5338-4572-879D-A9DEB00EBD56}.Release|Any CPU.Build.0 = Release|Any CPU + {56467A5A-7DD6-45B3-A84C-144A3C5D0C7A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {56467A5A-7DD6-45B3-A84C-144A3C5D0C7A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {56467A5A-7DD6-45B3-A84C-144A3C5D0C7A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {56467A5A-7DD6-45B3-A84C-144A3C5D0C7A}.Release|Any CPU.Build.0 = Release|Any CPU + {8FEF48A8-6FF5-4B65-B84A-6690D735C703}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8FEF48A8-6FF5-4B65-B84A-6690D735C703}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8FEF48A8-6FF5-4B65-B84A-6690D735C703}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8FEF48A8-6FF5-4B65-B84A-6690D735C703}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {8FEF48A8-6FF5-4B65-B84A-6690D735C703} = {E971721A-1271-4359-8F76-9FF17C29582B} {56467A5A-7DD6-45B3-A84C-144A3C5D0C7A} = {E971721A-1271-4359-8F76-9FF17C29582B} + {8FEF48A8-6FF5-4B65-B84A-6690D735C703} = {E971721A-1271-4359-8F76-9FF17C29582B} EndGlobalSection EndGlobal diff --git a/ConventionTests/ConventionTests.NUnit.nuspec b/ConventionTests/ConventionTests.NUnit.nuspec deleted file mode 100644 index aa1564c..0000000 --- a/ConventionTests/ConventionTests.NUnit.nuspec +++ /dev/null @@ -1,18 +0,0 @@ - - - - 1.0.4 - Krzysztof Kozmic - Krzysztof Kozmic - - - - - - ConventionTests - ConventionTests - false - Simple convention-tester - Simple code-only package offering some structure to tests validating conventions. - - \ No newline at end of file diff --git a/ConventionTests/ConventionTests.csproj b/ConventionTests/ConventionTests.csproj deleted file mode 100644 index 740a1cf..0000000 --- a/ConventionTests/ConventionTests.csproj +++ /dev/null @@ -1,108 +0,0 @@ - - - - Debug - AnyCPU - 8.0.30703 - 2.0 - {1E12EA0C-9182-4029-991A-B0B9D38F5783} - Library - Properties - ConventionTests - ConventionTests - v4.0 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\packages\ApprovalTests.2.2\lib\ApprovalTests.dll - - - False - ..\packages\ApprovalTests.2.2\lib\ApprovalUtilities.dll - - - False - ..\packages\Castle.Core.3.2.0\lib\net40-client\Castle.Core.dll - - - False - ..\packages\Castle.Windsor.3.2.0\lib\net40\Castle.Windsor.dll - - - - ..\packages\Mono.Cecil.0.9.5.4\lib\net40\Mono.Cecil.dll - - - ..\packages\Mono.Cecil.0.9.5.4\lib\net40\Mono.Cecil.Mdb.dll - - - ..\packages\Mono.Cecil.0.9.5.4\lib\net40\Mono.Cecil.Pdb.dll - - - ..\packages\Mono.Cecil.0.9.5.4\lib\net40\Mono.Cecil.Rocks.dll - - - False - ..\packages\NUnit.2.6.2\lib\nunit.framework.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Designer - - - - - - \ No newline at end of file diff --git a/ConventionTests/ConventionTests.csproj.DotSettings b/ConventionTests/ConventionTests.csproj.DotSettings deleted file mode 100644 index 89239f5..0000000 --- a/ConventionTests/ConventionTests.csproj.DotSettings +++ /dev/null @@ -1,3 +0,0 @@ - - True - True \ No newline at end of file diff --git a/ConventionTests/ConventionTests.ncrunchproject b/ConventionTests/ConventionTests.ncrunchproject deleted file mode 100644 index c4410bf..0000000 --- a/ConventionTests/ConventionTests.ncrunchproject +++ /dev/null @@ -1,22 +0,0 @@ - - false - false - false - true - false - false - false - false - true - true - false - true - true - 60000 - - - - AutoDetect - STA - x86 - \ No newline at end of file diff --git a/ConventionTests/Conventions/Internal/AssemblyProjectLocator.cs b/ConventionTests/Conventions/Internal/AssemblyProjectLocator.cs deleted file mode 100644 index adcf201..0000000 --- a/ConventionTests/Conventions/Internal/AssemblyProjectLocator.cs +++ /dev/null @@ -1,55 +0,0 @@ -namespace ConventionTests -{ - using System; - using System.Reflection; - using Mono.Cecil; - using Mono.Cecil.Cil; - - public class AssemblyProjectLocator : IProjectLocator - { - readonly Assembly assembly; - - public AssemblyProjectLocator(Assembly assembly) - { - this.assembly = assembly; - } - - public string ProjectFilePath - { - get { return ResolveProjectFilePath(); } - } - - string ResolveProjectFilePath() - { - var readerParameters = new ReaderParameters {ReadSymbols = true, ReadingMode = ReadingMode.Deferred}; - var definition = AssemblyDefinition.ReadAssembly(assembly.Location, readerParameters); - var methodDefinition = GetMethodWithBody(definition); - var document = GetMethodDocument(methodDefinition); - return document.Url; - } - - static Document GetMethodDocument(MethodDefinition methodDefinition) - { - var instruction = methodDefinition.Body.Instructions[0]; - var document = instruction.SequencePoint.Document; - return document; - } - - static MethodDefinition GetMethodWithBody(AssemblyDefinition definition) - { - foreach (var type in definition.MainModule.Types) - { - if (type.HasMethods == false) continue; - - foreach (var method in type.Methods) - { - if (method.HasBody) - { - return method; - } - } - } - throw new InvalidOperationException("Couldn't find any type with methods with body"); - } - } -} \ No newline at end of file diff --git a/ConventionTests/Conventions/Internal/ConventionData.Generic.cs b/ConventionTests/Conventions/Internal/ConventionData.Generic.cs deleted file mode 100644 index 1a9cb7a..0000000 --- a/ConventionTests/Conventions/Internal/ConventionData.Generic.cs +++ /dev/null @@ -1,85 +0,0 @@ -namespace ConventionTests -{ - using System; - using System.Text; - - /// - /// This is where we set what our convention is all about - /// - public class ConventionData - { - public static readonly Predicate All = _ => true; - public static readonly Predicate None = _ => false; - Action DefaultItemDescription = DefaultItemDescriptionMethod; - - static void DefaultItemDescriptionMethod(TItem item, StringBuilder message) - { - if (ReferenceEquals(item, null)) - { - message.AppendLine("<>"); - } - else - { - message.AppendLine(item.ToString()); - } - } - - - public ConventionData(params TItem[] sourceItems) - { - SourceItems = sourceItems; - Items = All; - Must = None; - OrderBy = HashCode; - ItemDescription = DefaultItemDescription; - } - - public TItem[] SourceItems { get; set; } - - public Func OrderBy { get; set; } - - /// - /// Descriptive text used for failure message in test. Should explan what is wrong, and how to fix it (how to make types that do not conform to the convention do so). - /// - public string Description { get; set; } - - /// - /// Specifies that there are valid exceptions to the rule specified by the convention. - /// - /// - /// When set to true will run the test as Approval test so that the exceptional cases can be reviewed and approved. - /// - public bool HasApprovedExceptions { get; set; } - - /// - /// This is the convention. The predicate should return true for types that do conform to the convention, and false otherwise - /// - public Predicate Must { get; set; } - - /// - /// Predicate that finds types that we want to apply out convention to. - /// - public Predicate Items { get; set; } - - public Action ItemDescription { get; set; } - - object HashCode(TItem arg) - { - if (ReferenceEquals(arg, null)) - { - return 0; - } - return arg.GetHashCode(); - } - - /// - /// helper method to set in a more convenient manner. - /// - /// - public ConventionData WithApprovedExceptions(string explanation = null) - { - HasApprovedExceptions = true; - return this; - } - } -} \ No newline at end of file diff --git a/ConventionTests/Conventions/Internal/ConventionData.cs b/ConventionTests/Conventions/Internal/ConventionData.cs deleted file mode 100644 index bf84777..0000000 --- a/ConventionTests/Conventions/Internal/ConventionData.cs +++ /dev/null @@ -1,86 +0,0 @@ -namespace ConventionTests -{ - using System; - using System.Reflection; - using System.Text; - - /// - /// This is where we set what our convention is all about - /// - public class ConventionData - { - public static readonly Predicate All = _ => true; - public static readonly Predicate Fail = _ => false; - - public ConventionData() : this(null) - { - } - - /// - /// List of types to apply the convention to. Mutually exclusive with property. If - /// - /// is specified property will be ignored. - /// - /// - public ConventionData(params Type[] sourceTypes) - { - SourceTypes = sourceTypes; - Types = All; - Must = Fail; - } - - public Type[] SourceTypes { get; set; } - - /// - /// list of assemblies to scan for types that our convention is related to. Can be null, in which case all assemblies starting with The same prefix as your test assembly will be scanned - /// - public Assembly[] Assemblies { get; set; } - - /// - /// Descriptive text used for failure message in test. Should explan what is wrong, and how to fix it (how to make types that do not conform to the convention do so). - /// - public string Description { get; set; } - - /// - /// Specifies that there are valid exceptions to the rule specified by the convention. - /// - /// - /// When set to true will run the test as Approval test so that the exceptional cases can be reviewed and approved. - /// - public bool HasApprovedExceptions { get; set; } - - /// - /// This is the convention. The predicate should return true for types that do conform to the convention, and false otherwise - /// - public Predicate Must { get; set; } - - /// - /// Predicate that finds types that we want to apply out convention to. - /// - public Predicate Types { get; set; } - - public Action ItemDescription { get; set; } - - /// - /// helper method to set in a more convenient manner. - /// - /// - /// - public ConventionData FromAssembly(params Assembly[] assembly) - { - Assemblies = assembly; - return this; - } - - /// - /// helper method to set in a more convenient manner. - /// - /// - public ConventionData WithApprovedExceptions(string explanation = null) - { - HasApprovedExceptions = true; - return this; - } - } -} \ No newline at end of file diff --git a/ConventionTests/Conventions/Internal/ConventionTest.Generic.cs b/ConventionTests/Conventions/Internal/ConventionTest.Generic.cs deleted file mode 100644 index 72f499f..0000000 --- a/ConventionTests/Conventions/Internal/ConventionTest.Generic.cs +++ /dev/null @@ -1,56 +0,0 @@ -namespace ConventionTests -{ - using System; - using System.Linq; - using System.Text; - - /// - /// Base class for convention tests. Inherited types should be put in "/Conventions" folder in test assembly and follow Sentence_naming_convention_with_underscores_indead_of_spaces These tests will be ran by - /// - /// . - /// - public abstract class ConventionTest : ConventionTestBase - { - public override void Execute(IAssert assert) - { - var data = SetUp(); - var itemsToTest = GetItemsToTest(data); - if (itemsToTest.Length == 0) - { - assert.Inconclusive( - "No items found to apply the convention to. Make sure the Items predicate is correct and that the right sourceItems are specified."); - } - var invalidItems = Array.FindAll(itemsToTest, t => data.Must(t) == false); - var message = new StringBuilder(); - message.AppendLine(data.Description ?? "Invalid items found"); - foreach (var invalidType in invalidItems) - { - message.Append('\t'); - data.ItemDescription(invalidType, message); - } - if (data.HasApprovedExceptions) - { - Approve(message.ToString()); - } - else - { - assert.AreEqual(0, invalidItems.Count(), message.ToString()); - } - } - - /// - /// This is the only method you need to override. Return a that describes your convention. - /// - /// - protected abstract ConventionData SetUp(); - - protected virtual TItem[] GetItemsToTest(ConventionData data) - { - return data.SourceItems - .Where(data.Items.Invoke) - .OrderBy(data.OrderBy) - .ToArray(); - } - } -} \ No newline at end of file diff --git a/ConventionTests/Conventions/Internal/ConventionTest.cs b/ConventionTests/Conventions/Internal/ConventionTest.cs deleted file mode 100644 index 6337123..0000000 --- a/ConventionTests/Conventions/Internal/ConventionTest.cs +++ /dev/null @@ -1,78 +0,0 @@ -namespace ConventionTests -{ - using System; - using System.Linq; - using System.Reflection; - using System.Text; - - /// - /// Base class for convention tests. Inherited types should be put in "/Conventions" folder in test assembly and follow Sentence_naming_convention_with_underscores_indead_of_spaces These tests will be ran by - /// - /// . - /// - public abstract class ConventionTest : ConventionTestBase - { - public override void Execute(IAssert assert) - { - var data = SetUp(); - var typesToTest = GetTypesToTest(data); - if (typesToTest.Length == 0) - { - assert.Inconclusive( - "No types found to apply the convention to. Make sure the Types predicate is correct and that the right assemblies to scan are specified."); - } - var invalidItems = Array.FindAll(typesToTest, t => data.Must(t) == false); - - var message = new StringBuilder(); - message.AppendLine(data.Description ?? "Invalid types found"); - foreach (var invalidType in invalidItems) - { - message.Append('\t'); - data.ItemDescription(invalidType, message); - } - if (data.HasApprovedExceptions) - { - Approve(message.ToString()); - } - else - { - assert.AreEqual(0, invalidItems.Count(), message.ToString()); - } - } - - protected virtual Assembly[] GetAssembliesToScan(ConventionData data) - { - if (data.Assemblies != null) - { - return data.Assemblies; - } - var assembly = Assembly.GetCallingAssembly(); - var companyName = assembly.FullName.Substring(0, assembly.FullName.IndexOf('.')); - var assemblyNames = assembly.GetReferencedAssemblies(); - var applicationAssemblies = Array.FindAll(assemblyNames, n => n.FullName.StartsWith(companyName)); - var assemblies = Array.ConvertAll(applicationAssemblies, n => n.TryLoadAssembly()); - return Array.FindAll(assemblies, a => a != null); - } - - /// - /// This is the only method you need to override. Return a that describes your convention. - /// - /// - protected abstract ConventionData SetUp(); - - protected virtual Type[] GetTypesToTest(ConventionData data) - { - if (data.SourceTypes != null) - { - return data.SourceTypes; - } - - return GetAssembliesToScan(data) - .SelectMany(a => a.SafeGetTypes()) - .Where(data.Types.Invoke) - .OrderBy(t => t.FullName) - .ToArray(); - } - } -} \ No newline at end of file diff --git a/ConventionTests/Conventions/Internal/ConventionTestBase.cs b/ConventionTests/Conventions/Internal/ConventionTestBase.cs deleted file mode 100644 index 9c863e6..0000000 --- a/ConventionTests/Conventions/Internal/ConventionTestBase.cs +++ /dev/null @@ -1,30 +0,0 @@ -namespace ConventionTests -{ - using System.ComponentModel; - using ApprovalTests; - - public abstract class ConventionTestBase : IConventionTest - { - public virtual string Name - { - get - { - var descriptions = GetType().GetCustomAttributes(typeof (DescriptionAttribute), false); - if (descriptions.Length == 1) - { - return ((DescriptionAttribute) descriptions[0]).Description; - } - return GetType().Name.Replace('_', ' '); - } - } - - public abstract void Execute(IAssert assert); - - protected void Approve(string message) - { - Approvals.Verify(new ApprovalTextWriter(message), - new ConventionTestNamer(GetType().Name), - Approvals.GetReporter()); - } - } -} \ No newline at end of file diff --git a/ConventionTests/Conventions/Internal/ConventionTestNamer.cs b/ConventionTests/Conventions/Internal/ConventionTestNamer.cs deleted file mode 100644 index e3ddbef..0000000 --- a/ConventionTests/Conventions/Internal/ConventionTestNamer.cs +++ /dev/null @@ -1,20 +0,0 @@ -namespace ConventionTests -{ - using ApprovalTests.Core; - using ApprovalTests.Namers; - - public class ConventionTestNamer : UnitTestFrameworkNamer, IApprovalNamer - { - readonly string name; - - public ConventionTestNamer(string name) - { - this.name = name; - } - - string IApprovalNamer.Name - { - get { return name; } - } - } -} \ No newline at end of file diff --git a/ConventionTests/Conventions/Internal/IAssert.cs b/ConventionTests/Conventions/Internal/IAssert.cs deleted file mode 100644 index 5bf7182..0000000 --- a/ConventionTests/Conventions/Internal/IAssert.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace ConventionTests -{ - public interface IAssert - { - void Inconclusive(string message); - void AreEqual(int expected, int actual, string message); - } -} \ No newline at end of file diff --git a/ConventionTests/Conventions/Internal/IConventionTest.cs b/ConventionTests/Conventions/Internal/IConventionTest.cs deleted file mode 100644 index d8f20bf..0000000 --- a/ConventionTests/Conventions/Internal/IConventionTest.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace ConventionTests -{ - public interface IConventionTest - { - string Name { get; } - void Execute(IAssert assert); - } -} \ No newline at end of file diff --git a/ConventionTests/Conventions/Internal/IProjectLocator.cs b/ConventionTests/Conventions/Internal/IProjectLocator.cs deleted file mode 100644 index 62d1f46..0000000 --- a/ConventionTests/Conventions/Internal/IProjectLocator.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace ConventionTests -{ - public interface IProjectLocator - { - string ProjectFilePath { get; } - } -} \ No newline at end of file diff --git a/ConventionTests/Conventions/Internal/ProjectConventionData.cs b/ConventionTests/Conventions/Internal/ProjectConventionData.cs deleted file mode 100644 index 8feb6de..0000000 --- a/ConventionTests/Conventions/Internal/ProjectConventionData.cs +++ /dev/null @@ -1,24 +0,0 @@ -namespace ConventionTests -{ - using System; - using System.Reflection; - - public class ProjectConventionData - { - readonly IProjectLocator projectLocator; - - public ProjectConventionData(IProjectLocator projectLocator) - { - this.projectLocator = projectLocator; - } - - public ProjectConventionData(Assembly assembly) : this(new AssemblyProjectLocator(assembly)) - { - - } - - public ProjectConventionData(Type type) : this(type.Assembly) - { - } - } -} \ No newline at end of file diff --git a/ConventionTests/Conventions/Internal/ProjectConvetionTest.cs b/ConventionTests/Conventions/Internal/ProjectConvetionTest.cs deleted file mode 100644 index 2e0cda5..0000000 --- a/ConventionTests/Conventions/Internal/ProjectConvetionTest.cs +++ /dev/null @@ -1,16 +0,0 @@ -namespace ConventionTests -{ - public abstract class ProjectConvetionTest : ConventionTestBase - { - public override void Execute(IAssert assert) - { - var data = SetUp(); - } - - /// - /// This is the only method you need to override. Return a that describes your convention. - /// - /// - protected abstract ProjectConventionData SetUp(); - } -} \ No newline at end of file diff --git a/ConventionTests/Conventions/Internal/ReflectionExtensions.cs b/ConventionTests/Conventions/Internal/ReflectionExtensions.cs deleted file mode 100644 index 77a7830..0000000 --- a/ConventionTests/Conventions/Internal/ReflectionExtensions.cs +++ /dev/null @@ -1,70 +0,0 @@ -namespace ConventionTests -{ - using System; - using System.IO; - using System.Linq; - using System.Reflection; - - public static class ReflectionExtensions - { - public static Assembly TryLoadAssembly(this AssemblyName name) - { - try - { - return Assembly.Load(name); - } - catch (FileNotFoundException) - { - return null; - } - catch (FileLoadException) - { - return null; - } - catch (BadImageFormatException) - { - return null; - } - catch (ReflectionTypeLoadException) - { - return null; - } - } - - public static Type[] SafeGetTypes(this Assembly assembly) - { - try - { - return assembly.GetTypes(); - } - catch (ReflectionTypeLoadException ex) - { - return Array.FindAll(ex.Types, x => x != null); - } - } - - public static IConventionTest[] GetAllConventions(Assembly assembly) - { - var conventionTypes = GetConventionTypes(); - return Array.ConvertAll(conventionTypes, CreateConvention); - } - - static bool IsConventionTest(Type type) - { - return type.IsClass && type.IsAbstract == false && typeof(IConventionTest).IsAssignableFrom(type); - } - - static IConventionTest CreateConvention(Type t) - { - return (IConventionTest)Activator.CreateInstance(t); - } - - static Type[] GetConventionTypes() - { - var types = - Assembly.GetExecutingAssembly().GetExportedTypes().Where( - IsConventionTest).ToArray(); - return types; - } - } -} \ No newline at end of file diff --git a/ConventionTests/Conventions/Internal/WindsorConventionData.cs b/ConventionTests/Conventions/Internal/WindsorConventionData.cs deleted file mode 100644 index bb4ffb8..0000000 --- a/ConventionTests/Conventions/Internal/WindsorConventionData.cs +++ /dev/null @@ -1,86 +0,0 @@ -namespace ConventionTests -{ - using System; - using Castle.MicroKernel; - using Castle.Windsor; - - public class WindsorConventionData - { - readonly IWindsorContainer container; - - public WindsorConventionData(IWindsorContainer container) - { - this.container = container; - } - - public Func Handlers { get; set; } - - public Func Must { get; set; } - - public IKernel Kernel - { - get { return Container.Kernel; } - } - - public IWindsorContainer Container - { - get { return container; } - } - - public Func ItemDescription { get; set; } - - public string Description { get; set; } - - public bool HasApprovedExceptions { get; set; } - - /// - /// helper method to set in a more convenient manner. - /// - /// - public WindsorConventionData WithApprovedExceptions(string explanation = null) - { - HasApprovedExceptions = true; - return this; - } - } - - public class WindsorConventionData - { - readonly IWindsorContainer container; - - public WindsorConventionData(IWindsorContainer container) - { - this.container = container; - } - - public IKernel Kernel - { - get { return Container.Kernel; } - } - - public IWindsorContainer Container - { - get { return container; } - } - - public Func ItemDescription { get; set; } - - public Func Must { get; set; } - - public string Description { get; set; } - - public bool HasApprovedExceptions { get; set; } - - public Func OrderBy { get; set; } - - /// - /// helper method to set in a more convenient manner. - /// - /// - public WindsorConventionData WithApprovedExceptions(string explanation = null) - { - HasApprovedExceptions = true; - return this; - } - } -} \ No newline at end of file diff --git a/ConventionTests/Conventions/Internal/WindsorConventionTest.cs b/ConventionTests/Conventions/Internal/WindsorConventionTest.cs deleted file mode 100644 index b56759b..0000000 --- a/ConventionTests/Conventions/Internal/WindsorConventionTest.cs +++ /dev/null @@ -1,129 +0,0 @@ -namespace ConventionTests -{ - using System; - using System.Collections.Generic; - using System.Linq; - using System.Text; - using Castle.MicroKernel; - using Castle.MicroKernel.Handlers; - using Castle.Windsor.Diagnostics; - using Castle.Windsor.Diagnostics.Helpers; - - public abstract class WindsorConventionTest : WindsorConventionTest - where TDiagnostic : class, IDiagnostic>, IDiagnostic - { - } - - public abstract class WindsorConventionTest : ConventionTestBase - where TDiagnostic : class, IDiagnostic>, IDiagnostic - { - public override void Execute(IAssert assert) - { - var conventionData = SetUp(); - var diagnosticData = GetDataToTest(conventionData); - var itemDescription = (conventionData.ItemDescription ?? (h => h.ToString() + "*")); - var invalidData = conventionData.Must == null - ? diagnosticData - : Array.FindAll(diagnosticData, h => conventionData.Must(h) == false); - var message = (conventionData.Description ?? "Invalid elements found") + Environment.NewLine + "\t" + - string.Join(Environment.NewLine + "\t", invalidData.Select(itemDescription)); - if (conventionData.HasApprovedExceptions) - { - Approve(message); - } - else - { - assert.AreEqual(0, invalidData.Count(), message); - } - } - - protected string MissingDependenciesDescription(IHandler var) - { - var message = new StringBuilder("Some dependencies of this component could not be statically resolved."); - var info = var as IExposeDependencyInfo; - if (info == null) - { - return message.ToString(); - } - var inspector = new DependencyInspector(message); - info.ObtainDependencyDetails(inspector); - - return inspector.Message; - } - - TDiagnosticData[] GetDataToTest(WindsorConventionData data) - { - var host = data.Kernel.GetSubSystem(SubSystemConstants.DiagnosticsKey) as IDiagnosticsHost; - IDiagnostic> diagnostic = host.GetDiagnostic(); - if (diagnostic == null) - { - if (typeof (TDiagnostic).IsInterface) - { - throw new ArgumentException( - string.Format("Diagnostic {0} was not found in the container. Did you forget to add it?", - typeof (TDiagnostic))); - } - throw new ArgumentException( - string.Format( - "Diagnostic {0} was not found in the container. The type is not an interface. Did you mean to use one of interfaces it implements instead?", - typeof (TDiagnostic))); - } - var items = diagnostic.Inspect(); - if (data.OrderBy != null) - { - return items.OrderBy(data.OrderBy).ToArray(); - } - return items.ToArray(); - } - - protected abstract WindsorConventionData SetUp(); - } - - public abstract class WindsorConventionTest : ConventionTestBase - { - public override void Execute(IAssert assert) - { - var data = SetUp(); - var handlersToTest = GetHandlersToTest(data); - if (handlersToTest.Length == 0) - { - assert.Inconclusive( - "No handlers found to apply the convention to. Make sure the handlesr predicate is correct and that the right components were registered in the container."); - } - var itemDescription = (data.ItemDescription ?? (h => h.GetComponentName())); - var invalidComponents = data.Must == null - ? handlersToTest - : Array.FindAll(handlersToTest, h => data.Must(h) == false); - var message = (data.Description ?? "Invalid components found") + Environment.NewLine + "\t" + - string.Join(Environment.NewLine + "\t", invalidComponents.Select(itemDescription)); - if (data.HasApprovedExceptions) - { - Approve(message); - } - else - { - assert.AreEqual(0, invalidComponents.Count(), message); - } - } - - IHandler[] GetHandlersToTest(WindsorConventionData data) - { - IHandler[] handlers; - if (data.Handlers != null) - { - handlers = data.Handlers(data.Kernel); - } - else - { - handlers = data.Kernel.GetAssignableHandlers(typeof (object)); - } - Array.Sort(handlers, - (h1, h2) => - String.Compare(h1.GetComponentName(), h2.GetComponentName(), StringComparison.OrdinalIgnoreCase)); - - return handlers; - } - - protected abstract WindsorConventionData SetUp(); - } -} \ No newline at end of file diff --git a/ConventionTests/Conventions/__Run.cs b/ConventionTests/Conventions/__Run.cs deleted file mode 100644 index 1ca16af..0000000 --- a/ConventionTests/Conventions/__Run.cs +++ /dev/null @@ -1,57 +0,0 @@ -using ApprovalTests.Reporters; - -[assembly: UseReporter(typeof (DiffReporter))] - -namespace ConventionTests -{ - using System; - using System.Reflection; - using System.Runtime.CompilerServices; - using NUnit.Framework; - - [TestFixture] - public class ConventionTestsRunner - { - [TestFixtureSetUp] - public static void GlobalSetUp() - { - } - - public TestCaseData[] Conventions - { - [MethodImpl(MethodImplOptions.NoInlining)] - get - { - var conventions = ReflectionExtensions.GetAllConventions(Assembly.GetExecutingAssembly()); - var tests = Array.ConvertAll(conventions, BuildTestData); - return tests; - } - } - - TestCaseData BuildTestData(IConventionTest convention) - { - return new TestCaseData(convention).SetName(convention.Name); - } - - class NUnitAssert : IAssert - { - public void Inconclusive(string message) - { - Assert.Inconclusive(message); - } - - public void AreEqual(int expected, int actual, string message) - { - Assert.AreEqual(expected, actual, message); - } - } - - [Test] - [TestCaseSource("Conventions")] - [MethodImpl(MethodImplOptions.NoInlining)] - public void Run(IConventionTest test) - { - test.Execute(new NUnitAssert()); - } - } -} \ No newline at end of file diff --git a/ConventionTests/Properties/AssemblyInfo.cs b/ConventionTests/Properties/AssemblyInfo.cs deleted file mode 100644 index d867daf..0000000 --- a/ConventionTests/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System.Reflection; -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("ConventionTests")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("ConventionTests")] -[assembly: AssemblyCopyright("Copyright © 2012")] -[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("65eebf47-5385-43ca-9d50-0ebd538c3ad3")] - -// 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")] \ No newline at end of file diff --git a/ConventionTests/packages.config b/ConventionTests/packages.config deleted file mode 100644 index 7cd9237..0000000 --- a/ConventionTests/packages.config +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/SampleApp.Tests/DomainTests.cs b/Samples/SampleApp.Tests/DomainTests.cs similarity index 100% rename from SampleApp.Tests/DomainTests.cs rename to Samples/SampleApp.Tests/DomainTests.cs diff --git a/SampleApp.Tests/DtoTests.cs b/Samples/SampleApp.Tests/DtoTests.cs similarity index 100% rename from SampleApp.Tests/DtoTests.cs rename to Samples/SampleApp.Tests/DtoTests.cs diff --git a/SampleApp.Tests/MvcTests.cs b/Samples/SampleApp.Tests/MvcTests.cs similarity index 100% rename from SampleApp.Tests/MvcTests.cs rename to Samples/SampleApp.Tests/MvcTests.cs diff --git a/SampleApp.Tests/Properties/AssemblyInfo.cs b/Samples/SampleApp.Tests/Properties/AssemblyInfo.cs similarity index 100% rename from SampleApp.Tests/Properties/AssemblyInfo.cs rename to Samples/SampleApp.Tests/Properties/AssemblyInfo.cs diff --git a/SampleApp.Tests/SampleApp.Tests.csproj b/Samples/SampleApp.Tests/SampleApp.Tests.csproj similarity index 96% rename from SampleApp.Tests/SampleApp.Tests.csproj rename to Samples/SampleApp.Tests/SampleApp.Tests.csproj index f990830..d41ddbd 100644 --- a/SampleApp.Tests/SampleApp.Tests.csproj +++ b/Samples/SampleApp.Tests/SampleApp.Tests.csproj @@ -72,7 +72,7 @@ {56467A5A-7DD6-45B3-A84C-144A3C5D0C7A} SampleApp - + {955B0236-089F-434D-BA02-63A1E24C2B7C} TestStack.ConventionTests diff --git a/SampleApp.Tests/SampleApp.Tests.ncrunchproject b/Samples/SampleApp.Tests/SampleApp.Tests.ncrunchproject similarity index 100% rename from SampleApp.Tests/SampleApp.Tests.ncrunchproject rename to Samples/SampleApp.Tests/SampleApp.Tests.ncrunchproject diff --git a/SampleApp.Tests/SqlScriptTests.cs b/Samples/SampleApp.Tests/SqlScriptTests.cs similarity index 100% rename from SampleApp.Tests/SqlScriptTests.cs rename to Samples/SampleApp.Tests/SqlScriptTests.cs diff --git a/SampleApp.Tests/WebApiTests.cs b/Samples/SampleApp.Tests/WebApiTests.cs similarity index 100% rename from SampleApp.Tests/WebApiTests.cs rename to Samples/SampleApp.Tests/WebApiTests.cs diff --git a/SampleApp.Tests/WpfTests.cs b/Samples/SampleApp.Tests/WpfTests.cs similarity index 100% rename from SampleApp.Tests/WpfTests.cs rename to Samples/SampleApp.Tests/WpfTests.cs diff --git a/SampleApp.Tests/__TryItOut__.txt b/Samples/SampleApp.Tests/__TryItOut__.txt similarity index 100% rename from SampleApp.Tests/__TryItOut__.txt rename to Samples/SampleApp.Tests/__TryItOut__.txt diff --git a/SampleApp.Tests/packages.config b/Samples/SampleApp.Tests/packages.config similarity index 100% rename from SampleApp.Tests/packages.config rename to Samples/SampleApp.Tests/packages.config diff --git a/SampleApp/Domain/DomainClass.cs b/Samples/SampleApp/Domain/DomainClass.cs similarity index 100% rename from SampleApp/Domain/DomainClass.cs rename to Samples/SampleApp/Domain/DomainClass.cs diff --git a/SampleApp/Dtos/SomeDto.cs b/Samples/SampleApp/Dtos/SomeDto.cs similarity index 100% rename from SampleApp/Dtos/SomeDto.cs rename to Samples/SampleApp/Dtos/SomeDto.cs diff --git a/SampleApp/Mvc/TestController.cs b/Samples/SampleApp/Mvc/TestController.cs similarity index 100% rename from SampleApp/Mvc/TestController.cs rename to Samples/SampleApp/Mvc/TestController.cs diff --git a/SampleApp/Properties/Annotations.cs b/Samples/SampleApp/Properties/Annotations.cs similarity index 100% rename from SampleApp/Properties/Annotations.cs rename to Samples/SampleApp/Properties/Annotations.cs diff --git a/SampleApp/Properties/AssemblyInfo.cs b/Samples/SampleApp/Properties/AssemblyInfo.cs similarity index 100% rename from SampleApp/Properties/AssemblyInfo.cs rename to Samples/SampleApp/Properties/AssemblyInfo.cs diff --git a/SampleApp/SampleApp.csproj b/Samples/SampleApp/SampleApp.csproj similarity index 100% rename from SampleApp/SampleApp.csproj rename to Samples/SampleApp/SampleApp.csproj diff --git a/SampleApp/SampleApp.ncrunchproject b/Samples/SampleApp/SampleApp.ncrunchproject similarity index 100% rename from SampleApp/SampleApp.ncrunchproject rename to Samples/SampleApp/SampleApp.ncrunchproject diff --git a/SampleApp/SqlScripts/Script0001.sql b/Samples/SampleApp/SqlScripts/Script0001.sql similarity index 100% rename from SampleApp/SqlScripts/Script0001.sql rename to Samples/SampleApp/SqlScripts/Script0001.sql diff --git a/SampleApp/WebApi/TestApiController.cs b/Samples/SampleApp/WebApi/TestApiController.cs similarity index 100% rename from SampleApp/WebApi/TestApiController.cs rename to Samples/SampleApp/WebApi/TestApiController.cs diff --git a/SampleApp/Wpf/SomeView.xaml b/Samples/SampleApp/Wpf/SomeView.xaml similarity index 100% rename from SampleApp/Wpf/SomeView.xaml rename to Samples/SampleApp/Wpf/SomeView.xaml diff --git a/SampleApp/Wpf/SomeView.xaml.cs b/Samples/SampleApp/Wpf/SomeView.xaml.cs similarity index 100% rename from SampleApp/Wpf/SomeView.xaml.cs rename to Samples/SampleApp/Wpf/SomeView.xaml.cs diff --git a/SampleApp/Wpf/SomeViewModel.cs b/Samples/SampleApp/Wpf/SomeViewModel.cs similarity index 100% rename from SampleApp/Wpf/SomeViewModel.cs rename to Samples/SampleApp/Wpf/SomeViewModel.cs diff --git a/SampleApp/Wpf/ViewModelBase.cs b/Samples/SampleApp/Wpf/ViewModelBase.cs similarity index 100% rename from SampleApp/Wpf/ViewModelBase.cs rename to Samples/SampleApp/Wpf/ViewModelBase.cs diff --git a/SampleApp/packages.config b/Samples/SampleApp/packages.config similarity index 100% rename from SampleApp/packages.config rename to Samples/SampleApp/packages.config From adf6ad243ff1e23a064bf30fe7cbf169c7c8e336 Mon Sep 17 00:00:00 2001 From: Jake Ginnivan Date: Sun, 29 Sep 2013 09:13:04 +0100 Subject: [PATCH 2/2] Fixed build --- Samples/SampleApp.Tests/SampleApp.Tests.csproj | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Samples/SampleApp.Tests/SampleApp.Tests.csproj b/Samples/SampleApp.Tests/SampleApp.Tests.csproj index d41ddbd..ccaf67e 100644 --- a/Samples/SampleApp.Tests/SampleApp.Tests.csproj +++ b/Samples/SampleApp.Tests/SampleApp.Tests.csproj @@ -32,24 +32,24 @@ False - ..\packages\Newtonsoft.Json.4.5.11\lib\net40\Newtonsoft.Json.dll + ..\..\packages\Newtonsoft.Json.4.5.11\lib\net40\Newtonsoft.Json.dll - ..\packages\NUnit.2.6.2\lib\nunit.framework.dll + ..\..\packages\NUnit.2.6.2\lib\nunit.framework.dll - ..\packages\Microsoft.Net.Http.2.0.20710.0\lib\net40\System.Net.Http.dll + ..\..\packages\Microsoft.Net.Http.2.0.20710.0\lib\net40\System.Net.Http.dll - ..\packages\Microsoft.AspNet.WebApi.Client.4.0.30506.0\lib\net40\System.Net.Http.Formatting.dll + ..\..\packages\Microsoft.AspNet.WebApi.Client.4.0.30506.0\lib\net40\System.Net.Http.Formatting.dll - ..\packages\Microsoft.Net.Http.2.0.20710.0\lib\net40\System.Net.Http.WebRequest.dll + ..\..\packages\Microsoft.Net.Http.2.0.20710.0\lib\net40\System.Net.Http.WebRequest.dll - ..\packages\Microsoft.AspNet.WebApi.Core.4.0.30506.0\lib\net40\System.Web.Http.dll + ..\..\packages\Microsoft.AspNet.WebApi.Core.4.0.30506.0\lib\net40\System.Web.Http.dll