Fixing ModelChunkVisitorTest to match resource name
Fixing stylecop issues
This commit is contained in:
parent
83f585e583
commit
0f0d44c6b3
|
|
@ -23,7 +23,7 @@ namespace Microsoft.AspNet.Mvc.Razor
|
||||||
// NOTE: If there's more than 1 model chunk there will be a Razor error BUT we want intellisense to
|
// NOTE: If there's more than 1 model chunk there will be a Razor error BUT we want intellisense to
|
||||||
// show up on the current model chunk that the user is typing.
|
// show up on the current model chunk that the user is typing.
|
||||||
var modelChunk = Context.CodeTreeBuilder.CodeTree.Chunks.OfType<ModelChunk>()
|
var modelChunk = Context.CodeTreeBuilder.CodeTree.Chunks.OfType<ModelChunk>()
|
||||||
.LastOrDefault();
|
.LastOrDefault();
|
||||||
|
|
||||||
// If there were any model chunks then we need to modify the class declaration signature.
|
// If there were any model chunks then we need to modify the class declaration signature.
|
||||||
if (modelChunk != null)
|
if (modelChunk != null)
|
||||||
|
|
@ -55,7 +55,7 @@ namespace Microsoft.AspNet.Mvc.Razor
|
||||||
writer.WriteLineHiddenDirective();
|
writer.WriteLineHiddenDirective();
|
||||||
|
|
||||||
var arguments = injectVisitor.InjectChunks
|
var arguments = injectVisitor.InjectChunks
|
||||||
.Select(chunk => new KeyValuePair<string, string>(chunk.TypeName,
|
.Select(chunk => new KeyValuePair<string, string>(chunk.TypeName,
|
||||||
chunk.MemberName));
|
chunk.MemberName));
|
||||||
using (writer.BuildConstructor("public", Context.ClassName, arguments))
|
using (writer.BuildConstructor("public", Context.ClassName, arguments))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -112,8 +112,8 @@ Environment.NewLine +
|
||||||
};
|
};
|
||||||
host.NamespaceImports.Clear();
|
host.NamespaceImports.Clear();
|
||||||
var engine = new RazorTemplateEngine(host);
|
var engine = new RazorTemplateEngine(host);
|
||||||
var source = ReadResource("Model.cshtml");
|
var source = ReadResource("TestFiles/Input/Model.cshtml");
|
||||||
var expectedCode = ReadResource("Model.cs");
|
var expectedCode = ReadResource("TestFiles/Output/Model.cs");
|
||||||
var expectedLineMappings = new List<LineMapping>
|
var expectedLineMappings = new List<LineMapping>
|
||||||
{
|
{
|
||||||
BuildLineMapping(7, 0, 7, 126, 6, 7, 30),
|
BuildLineMapping(7, 0, 7, 126, 6, 7, 30),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue