Further condense steps

This commit is contained in:
David Zhao 2019-04-05 15:48:48 +09:00
parent 37ffe47e4b
commit c693d1fad8
1 changed files with 20 additions and 13 deletions

View File

@ -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)