Skip to content

Commit 3564735

Browse files
committed
Merged rename
1 parent 7c511da commit 3564735

2 files changed

Lines changed: 54 additions & 127 deletions

File tree

src/BlazorWebFormsComponents.Test/GridView/AutoGenerateColumns.razor

Lines changed: 54 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -17,57 +17,68 @@
1717
</Fixture>
1818

1919
@code {
20-
IEnumerable<Person> people = null;
21-
22-
void FirstTest(Fixture fixture)
23-
{
24-
var cut = fixture.GetComponentUnderTest();
25-
var tableHeaders = cut.FindAll("th");
26-
tableHeaders.Count.ShouldBe(4, "Did not render 4 TH elements");
27-
tableHeaders[0].TextContent.ShouldBe("Id");
28-
tableHeaders[1].TextContent.ShouldBe("Name");
29-
tableHeaders[2].TextContent.ShouldBe("Price");
30-
tableHeaders[3].TextContent.ShouldBe("LastUpdate");
31-
}
32-
33-
void SecondTest(Fixture fixture)
34-
{
35-
people = GetPeople();
36-
37-
var cut = fixture.GetComponentUnderTest();
38-
var tableHeaders = cut.FindAll("th");
39-
tableHeaders[0].TextContent.ShouldBe("FirstName");
40-
tableHeaders[1].TextContent.ShouldBe("LastName");
41-
tableHeaders.Count.ShouldBe(2, "Did not render 2 TH elements");
42-
}
43-
44-
IQueryable<Widget> GetWidgets(int maxRows, int startRowIndex, string sortByExpression, out int totalRowCount)
45-
{
46-
totalRowCount = Widget.SimpleWidgetList.Length;
47-
return Widget.SimpleWidgetList.AsQueryable();
48-
}
49-
50-
IEnumerable<Person> GetPeople()
51-
=> new List<Person>
20+
IEnumerable<Person> people = null;
21+
22+
void FirstTest(Fixture fixture)
23+
{
24+
var cut = fixture.GetComponentUnderTest();
25+
var tableHeaders = cut.FindAll("th");
26+
tableHeaders.Count.ShouldBe(4, "Did not render 4 TH elements");
27+
tableHeaders[0].TextContent.ShouldBe("Id");
28+
tableHeaders[1].TextContent.ShouldBe("Name");
29+
tableHeaders[2].TextContent.ShouldBe("Price");
30+
tableHeaders[3].TextContent.ShouldBe("LastUpdate");
31+
}
32+
33+
void SecondTest(Fixture fixture)
5234
{
35+
people = GetPeople();
36+
37+
var cut = fixture.GetComponentUnderTest();
38+
var tableHeaders = cut.FindAll("th");
39+
tableHeaders[0].TextContent.ShouldBe("FirstName");
40+
tableHeaders[1].TextContent.ShouldBe("LastName");
41+
tableHeaders.Count.ShouldBe(2, "Did not render 2 TH elements");
42+
}
43+
44+
IQueryable<Widget> GetWidgets(int maxRows, int startRowIndex, string sortByExpression, out int totalRowCount)
45+
{
46+
totalRowCount = Widget.SimpleWidgetList.Length;
47+
return Widget.SimpleWidgetList.AsQueryable();
48+
}
49+
50+
IEnumerable<Person> GetPeople()
51+
=> new List<Person>
52+
{
5353
new Person { FirstName = "Jeff", LastName = "Fritz" },
5454
new Person { FirstName = "Hisham", LastName = "Bin Ateya" }
55-
};
55+
};
5656

57-
class Person
58-
{
59-
private int _id;
57+
class Person
58+
{
59+
private int _id;
60+
61+
private int Id { get => _id; set => _id = value; }
62+
63+
public string FirstName { get; set; }
6064

61-
private int Id { get => _id; set => _id = value; }
65+
public string LastName { get; set; }
6266

63-
public string FirstName { get; set; }
67+
public Person this[int id] => null;
6468

65-
public string LastName { get; set; }
69+
public Person this[string name] => null;
6670

67-
public Person this[int id] => null;
71+
public static int Count { get; }
72+
73+
public IEnumerable<Address> Addresses { get; set; }
74+
}
75+
76+
public class Address
77+
{
78+
public string City { get; set; }
6879

69-
public Person this[string name] => null;
80+
public string District { get; set; }
7081

71-
public static int Count { get; }
72-
}
82+
public string Street { get; set; }
83+
}
7384
}

src/BlazorWebFormsComponents.Test/GridView/AutogenerateColumns.razor

Lines changed: 0 additions & 84 deletions
This file was deleted.

0 commit comments

Comments
 (0)