Make tests actually test

This commit is contained in:
Dean Herbert 2019-10-24 13:18:31 +09:00
parent 967551fec0
commit 42e33dde0c

View File

@ -46,13 +46,11 @@ namespace osu.Game.Tests.Visual.UserInterface
});
AddStep(@"Seek track to 6 second", () => musicController.SeekTo(6000));
AddStep(@"Call PrevTrack", () => musicController.PreviousTrack());
AddAssert(@"Check if it restarted", () => currentTrack == Beatmap.Value);
AddAssert(@"Check action is restart track", () => musicController.PreviousTrack() == PreviousTrackResult.Restart);
AddAssert(@"Check track didn't change", () => currentTrack == Beatmap.Value);
AddStep(@"Seek track to 2 second", () => musicController.SeekTo(2000));
AddStep(@"Call PrevTrack", () => musicController.PreviousTrack());
// If the track isn't changing, check the current track's time instead
AddAssert(@"Check if it changed to prev track'", () => currentTrack != Beatmap.Value || currentTrack.Track.CurrentTime < 2000);
AddAssert(@"Check action is previous track", () => musicController.PreviousTrack() == PreviousTrackResult.Previous);
}
}
}