mirror of https://github.com/ppy/osu
Further condense steps
This commit is contained in:
parent
37ffe47e4b
commit
c693d1fad8
|
@ -100,7 +100,12 @@ public void TransferFacadeTest()
|
|||
AddStep("Add tracking containers", addFacadeContainers);
|
||||
AddStep("Move facade to random position", startTrackingRandom);
|
||||
AddStep("Remove facade from FacadeContainer", removeFacade);
|
||||
AddStep("Transfer facade to a new container", addFacadeToNewContainer);
|
||||
AddStep("Transfer facade to a new container", () =>
|
||||
{
|
||||
transferContainer.Add(logoFacade);
|
||||
transferContainerBox.Colour = Color4.Tomato;
|
||||
moveLogoFacade();
|
||||
});
|
||||
waitForMove();
|
||||
AddAssert("Logo is tracking", () => trackingContainer.IsLogoTracking);
|
||||
}
|
||||
|
@ -186,7 +191,11 @@ public void FlowContainerTest()
|
|||
public void SetFacadeSizeTest()
|
||||
{
|
||||
bool failed = false;
|
||||
AddStep("Add tracking containers", addFacadeContainers);
|
||||
AddStep("Set up scenario", () =>
|
||||
{
|
||||
failed = false;
|
||||
addFacadeContainers();
|
||||
});
|
||||
AddStep("Try setting facade size", () =>
|
||||
{
|
||||
try
|
||||
|
@ -203,13 +212,18 @@ public void SetFacadeSizeTest()
|
|||
}
|
||||
|
||||
[Test]
|
||||
public void SetMultipleContainers()
|
||||
public void SetMultipleContainersTest()
|
||||
{
|
||||
bool failed = false;
|
||||
LogoTrackingContainer newContainer = new LogoTrackingContainer();
|
||||
AddStep("Add tracking containers", addFacadeContainers);
|
||||
AddStep("Move facade to random position", startTrackingRandom);
|
||||
AddStep("Add logo to new container", () => newContainer.SetLogo(logo));
|
||||
AddStep("Set up scenario", () =>
|
||||
{
|
||||
failed = false;
|
||||
newContainer = new LogoTrackingContainer();
|
||||
addFacadeContainers();
|
||||
startTrackingRandom();
|
||||
newContainer.SetLogo(logo);
|
||||
});
|
||||
AddStep("Try tracking new container", () =>
|
||||
{
|
||||
try
|
||||
|
@ -272,13 +286,6 @@ private void startTrackingRandom()
|
|||
moveLogoFacade();
|
||||
}
|
||||
|
||||
private void addFacadeToNewContainer()
|
||||
{
|
||||
transferContainer.Add(logoFacade);
|
||||
transferContainerBox.Colour = Color4.Tomato;
|
||||
moveLogoFacade();
|
||||
}
|
||||
|
||||
private void moveLogoFacade()
|
||||
{
|
||||
if (logoFacade?.Transforms.Count == 0 && transferContainer?.Transforms.Count == 0)
|
||||
|
|
Loading…
Reference in New Issue