fix build break in razor tests and tests for resources
This commit is contained in:
parent
90cef3b9ca
commit
df358f8b98
|
|
@ -14,7 +14,7 @@ namespace Microsoft.AspNet.Mvc.FunctionalTests
|
|||
{
|
||||
public class RazorInstrumentationTests
|
||||
{
|
||||
private readonly IServiceProvider _services = TestHelper.CreateServices("RazorInstrumentationWebSite");
|
||||
private readonly IServiceProvider _services = TestHelper.CreateServices("RazorInstrumentationWebsite");
|
||||
private readonly Action<IApplicationBuilder> _app = new Startup().Configure;
|
||||
|
||||
public static IEnumerable<object[]> InstrumentationData
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding.Metadata
|
|||
var display = new DisplayAttribute()
|
||||
{
|
||||
Name = "DisplayAttribute_Name",
|
||||
ResourceType = typeof(Test.Resources),
|
||||
ResourceType = typeof(Test.TestResources),
|
||||
};
|
||||
|
||||
var attributes = new Attribute[] { display };
|
||||
|
|
@ -180,7 +180,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding.Metadata
|
|||
var display = new DisplayAttribute()
|
||||
{
|
||||
Description = "DisplayAttribute_Description",
|
||||
ResourceType = typeof(Test.Resources),
|
||||
ResourceType = typeof(Test.TestResources),
|
||||
};
|
||||
|
||||
var attributes = new Attribute[] { display };
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
|
||||
namespace Microsoft.AspNet.Mvc.ModelBinding.Test
|
||||
{
|
||||
//public class ModelBindingContextTest
|
||||
|
|
|
|||
|
|
@ -26,38 +26,6 @@ namespace Microsoft.AspNet.Mvc.ModelBinding.Test
|
|||
return string.Format(CultureInfo.CurrentCulture, GetString("CompareAttributeTestResource"), p0, p1);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// description from resources
|
||||
/// </summary>
|
||||
internal static string DisplayAttribute_Description
|
||||
{
|
||||
get { return GetString("DisplayAttribute_Description"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// description from resources
|
||||
/// </summary>
|
||||
internal static string FormatDisplayAttribute_Description()
|
||||
{
|
||||
return GetString("DisplayAttribute_Description");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// name from resources
|
||||
/// </summary>
|
||||
internal static string DisplayAttribute_Name
|
||||
{
|
||||
get { return GetString("DisplayAttribute_Name"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// name from resources
|
||||
/// </summary>
|
||||
internal static string FormatDisplayAttribute_Name()
|
||||
{
|
||||
return GetString("DisplayAttribute_Name");
|
||||
}
|
||||
|
||||
private static string GetString(string name, params string[] formatterNames)
|
||||
{
|
||||
var value = _resourceManager.GetString(name);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
namespace Microsoft.AspNet.Mvc.ModelBinding.Test
|
||||
{
|
||||
// This class is a 'fake' resources for testing DisplayAttribute. We can't use actual resources
|
||||
// because our generator makes it an internal class, which doesn't work with DisplayAttribute.
|
||||
public static class TestResources
|
||||
{
|
||||
public static string DisplayAttribute_Description { get; } = "description from resources";
|
||||
|
||||
public static string DisplayAttribute_Name { get; } = "name from resources";
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue