mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 07:32:55 +08:00
Avoid embedding NUnit Assert inside test steps if possible
This commit is contained in:
parent
1e1422c16a
commit
522e2cdbcd
@ -125,11 +125,11 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
|
||||
AddStep("trigger skin change", () => skinSource.TriggerSourceChanged());
|
||||
|
||||
AddStep("retrieve new sample", () =>
|
||||
AddAssert("retrieve and ensure current sample is different", () =>
|
||||
{
|
||||
DrawableSample newSample = skinnableSound.ChildrenOfType<DrawableSample>().Single();
|
||||
Assert.IsTrue(newSample != sample, "Sample still hasn't been updated after a skin change event");
|
||||
sample = newSample;
|
||||
DrawableSample oldSample = sample;
|
||||
sample = skinnableSound.ChildrenOfType<DrawableSample>().Single();
|
||||
return sample != oldSample;
|
||||
});
|
||||
|
||||
AddAssert("new sample stopped", () => !sample.Playing);
|
||||
|
Loading…
Reference in New Issue
Block a user