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
this.GetValue(data, "page").Should().Be(1); |
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
private object GetValue(object source, string propertyName) | |
{ | |
return source.GetType().GetProperty(propertyName).GetValue(source, null); | |
} |
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
[Test] | |
public void SomeTest() | |
{ | |
var viewResult = this.controller.Index(new InputModelBuilder().Build()) as JsonResult; | |
viewResult.Should().NotBeNull(); | |
var data = viewResult.Data; | |
var pageNumber = data.GetType().GetProperty("page").GetValue(data, null); |
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
public ActionResult Index(InputModel model) | |
{ | |
return Json(new | |
{ | |
total = 1234, | |
page = 1, | |
rows = new List | |
{ | |
new | |
{ |
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
MERGE INTO Lookups AS Target | |
USING (VALUES | |
(0, N'Lookup Number 0'), | |
(1, N'Lookup Number 1'), | |
(2, N'Lookup Number 2'), | |
(3, N'Lookup Number 3'), | |
(4, N'Lookup Number 4'), | |
(5, N'Lookup Number 5'), | |
(6, N'Lookup Number 6') | |
) |
NewerOlder