Transition Razor test comparers to new project.

- Changed namespaces for test comparers.

#461
This commit is contained in:
N. Taylor Mullen 2015-07-27 12:23:09 -07:00
parent a66490c012
commit 4d0821f953
14 changed files with 58 additions and 50 deletions

View File

@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.22013.1
VisualStudioVersion = 14.0.23107.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{3C0D6505-79B3-49D0-B4C3-176F0F1836ED}"
EndProject
@ -15,6 +15,8 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNet.Razor.Runt
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNet.Razor.Runtime.Test", "test\Microsoft.AspNet.Razor.Runtime.Test\Microsoft.AspNet.Razor.Runtime.Test.xproj", "{0535998A-E32C-4D1A-80D1-0B15A513C471}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNet.Razor.Test.Sources", "src\Microsoft.AspNet.Razor.Test.Sources\Microsoft.AspNet.Razor.Test.Sources.xproj", "{E3A2A305-634D-4BA6-95DB-AA06D6C442B0}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -37,6 +39,10 @@ Global
{0535998A-E32C-4D1A-80D1-0B15A513C471}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0535998A-E32C-4D1A-80D1-0B15A513C471}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0535998A-E32C-4D1A-80D1-0B15A513C471}.Release|Any CPU.Build.0 = Release|Any CPU
{E3A2A305-634D-4BA6-95DB-AA06D6C442B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E3A2A305-634D-4BA6-95DB-AA06D6C442B0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E3A2A305-634D-4BA6-95DB-AA06D6C442B0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E3A2A305-634D-4BA6-95DB-AA06D6C442B0}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -46,5 +52,6 @@ Global
{87C7338B-0C06-4C7B-BE75-A2368AE26797} = {92463391-81BE-462B-AC3C-78C6C760741F}
{D0196096-1B01-4133-AACE-1A10A0F7247C} = {3C0D6505-79B3-49D0-B4C3-176F0F1836ED}
{0535998A-E32C-4D1A-80D1-0B15A513C471} = {92463391-81BE-462B-AC3C-78C6C760741F}
{E3A2A305-634D-4BA6-95DB-AA06D6C442B0} = {3C0D6505-79B3-49D0-B4C3-176F0F1836ED}
EndGlobalSection
EndGlobal

View File

@ -6,9 +6,9 @@ using System.Linq;
using Microsoft.AspNet.Razor.TagHelpers;
using Microsoft.Internal.Web.Utils;
namespace Microsoft.AspNet.Razor.Runtime.TagHelpers
namespace Microsoft.AspNet.Razor.Test.Internal
{
public class CaseSensitiveTagHelperDescriptorComparer : TagHelperDescriptorComparer
internal class CaseSensitiveTagHelperDescriptorComparer : TagHelperDescriptorComparer
{
public new static readonly CaseSensitiveTagHelperDescriptorComparer Default =
new CaseSensitiveTagHelperDescriptorComparer();

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.Props" Condition="'$(VSToolsPath)' != ''" />
<PropertyGroup Label="Globals">
<ProjectGuid>e3a2a305-634d-4ba6-95db-aa06d6c442b0</ProjectGuid>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\..\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
<OutputPath Condition="'$(OutputPath)'=='' ">..\..\artifacts\bin\$(MSBuildProjectName)\</OutputPath>
</PropertyGroup>
<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>

View File

@ -6,9 +6,9 @@ using System.Collections.Generic;
using Microsoft.AspNet.Razor.TagHelpers;
using Microsoft.Internal.Web.Utils;
namespace Microsoft.AspNet.Razor.Runtime.TagHelpers
namespace Microsoft.AspNet.Razor.Test.Internal
{
public class TagHelperAttributeDescriptorComparer : IEqualityComparer<TagHelperAttributeDescriptor>
internal class TagHelperAttributeDescriptorComparer : IEqualityComparer<TagHelperAttributeDescriptor>
{
public static readonly TagHelperAttributeDescriptorComparer Default =
new TagHelperAttributeDescriptorComparer();

View File

@ -6,9 +6,9 @@ using System.Collections.Generic;
using Microsoft.AspNet.Razor.TagHelpers;
using Microsoft.Internal.Web.Utils;
namespace Microsoft.AspNet.Razor.Runtime.TagHelpers
namespace Microsoft.AspNet.Razor.Test.Internal
{
public class TagHelperAttributeDesignTimeDescriptorComparer :
internal class TagHelperAttributeDesignTimeDescriptorComparer :
IEqualityComparer<TagHelperAttributeDesignTimeDescriptor>
{
public static readonly TagHelperAttributeDesignTimeDescriptorComparer Default =

View File

@ -6,9 +6,9 @@ using System.Collections.Generic;
using Microsoft.AspNet.Razor.TagHelpers;
using Microsoft.Internal.Web.Utils;
namespace Microsoft.AspNet.Razor.Runtime.TagHelpers
namespace Microsoft.AspNet.Razor.Test.Internal
{
public class TagHelperDesignTimeDescriptorComparer : IEqualityComparer<TagHelperDesignTimeDescriptor>
internal class TagHelperDesignTimeDescriptorComparer : IEqualityComparer<TagHelperDesignTimeDescriptor>
{
public static readonly TagHelperDesignTimeDescriptorComparer Default =
new TagHelperDesignTimeDescriptorComparer();

View File

@ -0,0 +1,13 @@
{
"version": "4.0.0-*",
"shared": "*.cs",
"dependencies": { },
"frameworks": {
"net45": { },
"dotnet": {
"dependencies": {
"System.Runtime": "4.0.20-*"
}
}
}
}

View File

@ -7,6 +7,7 @@ using System.ComponentModel;
using System.Linq;
using System.Reflection;
using Microsoft.AspNet.Razor.TagHelpers;
using Microsoft.AspNet.Razor.Test.Internal;
using Xunit;
namespace Microsoft.AspNet.Razor.Runtime.TagHelpers

View File

@ -7,6 +7,7 @@ using System.Linq;
using System.Reflection;
using Microsoft.AspNet.Razor.Parser;
using Microsoft.AspNet.Razor.TagHelpers;
using Microsoft.AspNet.Razor.Test.Internal;
using Xunit;
namespace Microsoft.AspNet.Razor.Runtime.TagHelpers

View File

@ -6,6 +6,7 @@ using System;
using System.IO;
using System.Reflection;
using Microsoft.AspNet.Razor.TagHelpers;
using Microsoft.AspNet.Razor.Test.Internal;
using Microsoft.AspNet.Testing;
using Moq;
using Xunit;

View File

@ -2,6 +2,10 @@
"version": "1.0.0",
"dependencies": {
"Microsoft.AspNet.Razor.Runtime": "4.0.0-*",
"Microsoft.AspNet.Razor.Test.Sources": {
"version": "4.0.0-*",
"type": "build"
},
"Microsoft.AspNet.Testing": "1.0.0-*",
"Microsoft.Framework.WebEncoders.Testing": "1.0.0-*",
"xunit.runner.aspnet": "2.0.0-aspnet-*"

View File

@ -3,6 +3,7 @@
using System;
using System.Linq;
using Microsoft.AspNet.Razor.Test.Internal;
using Newtonsoft.Json;
using Xunit;

View File

@ -1,41 +0,0 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using Microsoft.Internal.Web.Utils;
namespace Microsoft.AspNet.Razor.TagHelpers
{
public class TagHelperDesignTimeDescriptorComparer : IEqualityComparer<TagHelperDesignTimeDescriptor>
{
public static readonly TagHelperDesignTimeDescriptorComparer Default =
new TagHelperDesignTimeDescriptorComparer();
private TagHelperDesignTimeDescriptorComparer()
{
}
public bool Equals(TagHelperDesignTimeDescriptor descriptorX, TagHelperDesignTimeDescriptor descriptorY)
{
if (descriptorX == descriptorY)
{
return true;
}
return descriptorX != null &&
descriptorY != null &&
string.Equals(descriptorX.Summary, descriptorY.Summary, StringComparison.Ordinal) &&
string.Equals(descriptorX.Remarks, descriptorY.Remarks, StringComparison.Ordinal);
}
public int GetHashCode(TagHelperDesignTimeDescriptor descriptor)
{
return HashCodeCombiner
.Start()
.Add(descriptor.Summary, StringComparer.Ordinal)
.Add(descriptor.Remarks, StringComparer.Ordinal)
.CombinedHash;
}
}
}

View File

@ -3,6 +3,10 @@
"resource": "TestFiles/**/*",
"dependencies": {
"Microsoft.AspNet.Razor": "4.0.0-*",
"Microsoft.AspNet.Razor.Test.Sources": {
"version": "4.0.0-*",
"type": "build"
},
"Microsoft.AspNet.Testing": "1.0.0-*",
"xunit.runner.aspnet": "2.0.0-aspnet-*"
},