1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 10:52:53 +08:00

Tidy up test case

This commit is contained in:
Dean Herbert 2018-03-08 00:58:16 +09:00
parent 453fd83e01
commit e55a503f79

View File

@ -28,26 +28,25 @@ namespace osu.Game.Tests.Visual
public TestCaseUserProfileRecentSection()
{
var flow = new FillFlowContainer<DrawableRecentActivity>
Children = new Drawable[]
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Direction = FillDirection.Vertical,
new Box
{
RelativeSizeAxes = Axes.Both,
Colour = OsuColour.Gray(0.2f)
},
new ScrollContainer
{
RelativeSizeAxes = Axes.Both,
Child = new FillFlowContainer<DrawableRecentActivity>
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Direction = FillDirection.Vertical,
ChildrenEnumerable = createDummyActivities().Select(a => new DrawableRecentActivity(a))
},
}
};
flow.AddRange(createDummyActivities().Select(a => new DrawableRecentActivity(a)));
Add(new Box
{
RelativeSizeAxes = Axes.Both,
Colour = OsuColour.Gray(0.2f)
});
Add(new ScrollContainer
{
RelativeSizeAxes = Axes.Both,
Child = flow,
});
}
private IEnumerable<RecentActivity> createDummyActivities()