Add more tests

This commit is contained in:
Andrei Zavatski 2019-09-11 10:43:51 +03:00
parent 95828b07ef
commit d610c90371
1 changed files with 15 additions and 5 deletions

View File

@ -24,6 +24,18 @@ public TestSceneRankingsHeaderFlag()
HeaderFlag flag;
SpriteText text;
var countryA = new Country
{
FlagName = "BY",
FullName = "Belarus"
};
var countryB = new Country
{
FlagName = "US",
FullName = "United States"
};
AddRange(new Drawable[]
{
flag = new HeaderFlag
@ -31,11 +43,7 @@ public TestSceneRankingsHeaderFlag()
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Size = new Vector2(30, 20),
Country = new Country
{
FlagName = "BY",
FullName = "Belarus"
}
Country = countryA,
},
text = new SpriteText
{
@ -50,6 +58,8 @@ public TestSceneRankingsHeaderFlag()
flag.Action += () => text.FadeIn().Then().FadeOut(1000, Easing.OutQuint);
AddStep("Trigger click", () => flag.Click());
AddStep("Change to country 2", () => flag.Country = countryB);
AddStep("Change to country 1", () => flag.Country = countryA);
}
}
}