-
-
Save Novakov/629fdac7dba168a5fc20 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Theory] | |
[InlineData(typeof(string))] | |
[InlineData(typeof(byte))] | |
[InlineData(typeof(sbyte))] | |
[InlineData(typeof(short))] | |
[InlineData(typeof(ushort))] | |
[InlineData(typeof(int))] | |
[InlineData(typeof(uint))] | |
[InlineData(typeof(long))] | |
[InlineData(typeof(ulong))] | |
[InlineData(typeof(float))] | |
[InlineData(typeof(double))] | |
[InlineData(typeof(decimal))] | |
[InlineData(typeof(char))] | |
[InlineData(typeof(bool))] | |
[InlineData(typeof(object))] | |
[InlineData(typeof(Tuple<string>))] | |
[InlineData(typeof(Tuple<Tuple<string>>))] | |
[InlineData(typeof(Tuple<string, int>))] | |
[InlineData(typeof(Tuple<string, Tuple<int>>))] | |
[InlineData(typeof(Tuple<string, Tuple<int>, int>))] | |
[InlineData(typeof(Tuple<string, Tuple<int, string>, Tuple<int>, int>))] | |
[InlineData(typeof(Tuple<string, Tuple<int, string>, Tuple<int>, int, Tuple<string, Tuple<int, int>>>))] | |
[InlineData(typeof(int[]))] | |
[InlineData(typeof(int[,]))] | |
[InlineData(typeof(int[, , , ,]))] | |
[InlineData(typeof(int[][]))] | |
[InlineData(typeof(int[][, ,][]))] | |
[InlineData(typeof(Tuple<int, string>[][, ,][]))] | |
[InlineData(typeof(Tuple<int, int[][, ,][], string>))] | |
public void Should_be_able_to_render_csharp_view_with_generic_model(Type expectedType) | |
{ | |
// Given | |
var location = this.TestGenericView(expectedType, new CSharpCodeProvider(), "model"); | |
// When | |
var response = this.engine.RenderView(location, null, this.renderContext); | |
response.Contents.Invoke(stream); | |
// Then | |
stream.ShouldEqual(expectedType.FullName, true); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment