1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 00:02:54 +08:00

Move all TestCases to Testing project

This allows tests to successfully retrieve rulesets, as they are referenced.
This commit is contained in:
Dean Herbert 2017-10-23 19:29:47 +09:00
parent 59d908861e
commit dc9c474033
57 changed files with 72 additions and 58 deletions

View File

@ -233,6 +233,10 @@
<Project>{f167e17a-7de6-4af5-b920-a5112296c695}</Project>
<Name>osu.Game.Rulesets.Taiko</Name>
</ProjectReference>
<ProjectReference Include="..\osu.Game.Tests\osu.Game.Tests.csproj">
<Project>{54377672-20b1-40af-8087-5cf73bf3953a}</Project>
<Name>osu.Game.Tests</Name>
</ProjectReference>
<ProjectReference Include="..\osu.Game\osu.Game.csproj">
<Project>{2a66dd92-adb1-4994-89e2-c94e04acda0d}</Project>
<Name>osu.Game</Name>

View File

@ -0,0 +1,10 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
namespace osu.Game.Tests.Visual
{
public class TestCaseAllPlayers : TestCasePlayer
{
public override string Description => @"Showing everything to play the game.";
}
}

View File

@ -4,7 +4,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.EntityFrameworkCore;
using osu.Framework.Allocation;
using osu.Framework.MathUtils;
using osu.Game.Beatmaps;
@ -38,8 +37,7 @@ namespace osu.Game.Tests.Visual
var storage = new TestStorage(@"TestCasePlaySongSelect");
// this is by no means clean. should be replacing inside of OsuGameBase somehow.
var context = new OsuDbContext(storage.GetDatabaseConnectionString(@"client"));
context.Database.Migrate();
var context = new OsuDbContext();
Func<OsuDbContext> contextFactory = () => context;

View File

@ -90,6 +90,56 @@
<Compile Include="Beatmaps\IO\ImportBeatmapTest.cs" />
<Compile Include="Resources\Resource.cs" />
<Compile Include="Beatmaps\Formats\OsuLegacyDecoderTest.cs" />
<Compile Include="Visual\TestCaseBeatmapDetailArea.cs" />
<Compile Include="Visual\TestCaseBeatmapDetails.cs" />
<Compile Include="Visual\TestCaseBeatmapOptionsOverlay.cs" />
<Compile Include="Visual\TestCaseBeatmapSetOverlay.cs" />
<Compile Include="Visual\TestCaseBeatSyncedContainer.cs" />
<Compile Include="Visual\TestCaseBreadcrumbs.cs" />
<Compile Include="Visual\TestCaseBreakOverlay.cs" />
<Compile Include="Visual\TestCaseChatDisplay.cs" />
<Compile Include="Visual\TestCaseContextMenu.cs" />
<Compile Include="Visual\TestCaseDialogOverlay.cs" />
<Compile Include="Visual\TestCaseDirect.cs" />
<Compile Include="Visual\TestCaseDrawableRoom.cs" />
<Compile Include="Visual\TestCaseDrawings.cs" />
<Compile Include="Visual\TestCaseEditor.cs" />
<Compile Include="Visual\TestCaseEditorComposeTimeline.cs" />
<Compile Include="Visual\TestCaseEditorMenuBar.cs" />
<Compile Include="Visual\TestCaseEditorSummaryTimeline.cs" />
<Compile Include="Visual\TestCaseGamefield.cs" />
<Compile Include="Visual\TestCaseGraph.cs" />
<Compile Include="Visual\TestCaseIconButton.cs" />
<Compile Include="Visual\TestCaseKeyConfiguration.cs" />
<Compile Include="Visual\TestCaseKeyCounter.cs" />
<Compile Include="Visual\TestCaseLeaderboard.cs" />
<Compile Include="Visual\TestCaseMedalOverlay.cs" />
<Compile Include="Visual\TestCaseMenuButtonSystem.cs" />
<Compile Include="Visual\TestCaseMenuOverlays.cs" />
<Compile Include="Visual\TestCaseMods.cs" />
<Compile Include="Visual\TestCaseMusicController.cs" />
<Compile Include="Visual\TestCaseNotificationOverlay.cs" />
<Compile Include="Visual\TestCaseOnScreenDisplay.cs" />
<Compile Include="Visual\TestCaseAllPlayers.cs" />
<Compile Include="Visual\TestCasePlaySongSelect.cs" />
<Compile Include="Visual\TestCaseReplay.cs" />
<Compile Include="Visual\TestCaseReplaySettingsOverlay.cs" />
<Compile Include="Visual\TestCaseResults.cs" />
<Compile Include="Visual\TestCaseRoomInspector.cs" />
<Compile Include="Visual\TestCaseScoreCounter.cs" />
<Compile Include="Visual\TestCaseScrollingPlayfield.cs" />
<Compile Include="Visual\TestCaseSettings.cs" />
<Compile Include="Visual\TestCaseSkipButton.cs" />
<Compile Include="Visual\TestCaseSocial.cs" />
<Compile Include="Visual\TestCaseSongProgress.cs" />
<Compile Include="Visual\TestCaseStoryboard.cs" />
<Compile Include="Visual\TestCaseTabControl.cs" />
<Compile Include="Visual\TestCaseTextAwesome.cs" />
<Compile Include="Visual\TestCaseTwoLayerButton.cs" />
<Compile Include="Visual\TestCaseUserPanel.cs" />
<Compile Include="Visual\TestCaseUserProfile.cs" />
<Compile Include="Visual\TestCaseUserRanks.cs" />
<Compile Include="Visual\TestCaseWaveform.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\Soleily - Renatus %28Gamu%29 [Insane].osu" />

View File

@ -40,6 +40,8 @@ namespace osu.Game.Database
: this("DataSource=:memory:")
{
// required for tooling (see https://wildermuth.com/2017/07/06/Program-cs-in-ASP-NET-Core-2-0).
Migrate();
}
/// <summary>

View File

@ -20,7 +20,7 @@ using osu.Game.Screens.Edit.Screens.Design;
namespace osu.Game.Screens.Edit
{
internal class Editor : OsuScreen
public class Editor : OsuScreen
{
protected override BackgroundScreen CreateBackground() => new BackgroundScreenCustom(@"Backgrounds/bg4");

View File

@ -12,7 +12,7 @@ using osu.Game.Graphics;
namespace osu.Game.Screens.Edit.Screens.Compose.Timeline
{
internal class ScrollingTimelineContainer : ScrollContainer
public class ScrollingTimelineContainer : ScrollContainer
{
public readonly Bindable<bool> HitObjectsVisible = new Bindable<bool>();
public readonly Bindable<bool> HitSoundsVisible = new Bindable<bool>();

View File

@ -17,7 +17,7 @@ using OpenTK.Graphics;
namespace osu.Game.Tests.Visual
{
public class TestCasePlayer : OsuTestCase
public abstract class TestCasePlayer : OsuTestCase
{
private readonly Type ruleset;
@ -34,7 +34,7 @@ namespace osu.Game.Tests.Visual
this.ruleset = ruleset;
}
public TestCasePlayer()
protected TestCasePlayer()
{
}

View File

@ -768,55 +768,7 @@
<Compile Include="Tests\Beatmaps\TestWorkingBeatmap.cs" />
<Compile Include="Tests\Platform\TestStorage.cs" />
<Compile Include="Tests\Visual\OsuTestCase.cs" />
<Compile Include="Tests\Visual\TestCaseBeatmapDetailArea.cs" />
<Compile Include="Tests\Visual\TestCaseBeatmapDetails.cs" />
<Compile Include="Tests\Visual\TestCaseBeatmapOptionsOverlay.cs" />
<Compile Include="Tests\Visual\TestCaseBeatSyncedContainer.cs" />
<Compile Include="Tests\Visual\TestCaseBreadcrumbs.cs" />
<Compile Include="Tests\Visual\TestCaseBreakOverlay.cs" />
<Compile Include="Tests\Visual\TestCaseChatDisplay.cs" />
<Compile Include="Tests\Visual\TestCaseContextMenu.cs" />
<Compile Include="Tests\Visual\TestCaseDialogOverlay.cs" />
<Compile Include="Tests\Visual\TestCaseDirect.cs" />
<Compile Include="Tests\Visual\TestCaseDrawableRoom.cs" />
<Compile Include="Tests\Visual\TestCaseDrawings.cs" />
<Compile Include="Tests\Visual\TestCaseEditor.cs" />
<Compile Include="Tests\Visual\TestCaseEditorComposeTimeline.cs" />
<Compile Include="Tests\Visual\TestCaseEditorMenuBar.cs" />
<Compile Include="Tests\Visual\TestCaseEditorSummaryTimeline.cs" />
<Compile Include="Tests\Visual\TestCaseGamefield.cs" />
<Compile Include="Tests\Visual\TestCaseGraph.cs" />
<Compile Include="Tests\Visual\TestCaseIconButton.cs" />
<Compile Include="Tests\Visual\TestCaseKeyConfiguration.cs" />
<Compile Include="Tests\Visual\TestCaseKeyCounter.cs" />
<Compile Include="Tests\Visual\TestCaseLeaderboard.cs" />
<Compile Include="Tests\Visual\TestCaseMedalOverlay.cs" />
<Compile Include="Tests\Visual\TestCaseMenuButtonSystem.cs" />
<Compile Include="Tests\Visual\TestCaseMenuOverlays.cs" />
<Compile Include="Tests\Visual\TestCaseMods.cs" />
<Compile Include="Tests\Visual\TestCaseMusicController.cs" />
<Compile Include="Tests\Visual\TestCaseNotificationOverlay.cs" />
<Compile Include="Tests\Visual\TestCaseOnScreenDisplay.cs" />
<Compile Include="Tests\Visual\TestCasePlayer.cs" />
<Compile Include="Tests\Visual\TestCasePlaySongSelect.cs" />
<Compile Include="Tests\Visual\TestCaseReplay.cs" />
<Compile Include="Tests\Visual\TestCaseReplaySettingsOverlay.cs" />
<Compile Include="Tests\Visual\TestCaseResults.cs" />
<Compile Include="Tests\Visual\TestCaseRoomInspector.cs" />
<Compile Include="Tests\Visual\TestCaseScoreCounter.cs" />
<Compile Include="Tests\Visual\TestCaseScrollingPlayfield.cs" />
<Compile Include="Tests\Visual\TestCaseSettings.cs" />
<Compile Include="Tests\Visual\TestCaseSkipButton.cs" />
<Compile Include="Tests\Visual\TestCaseSocial.cs" />
<Compile Include="Tests\Visual\TestCaseSongProgress.cs" />
<Compile Include="Tests\Visual\TestCaseStoryboard.cs" />
<Compile Include="Tests\Visual\TestCaseTabControl.cs" />
<Compile Include="Tests\Visual\TestCaseTextAwesome.cs" />
<Compile Include="Tests\Visual\TestCaseTwoLayerButton.cs" />
<Compile Include="Tests\Visual\TestCaseUserPanel.cs" />
<Compile Include="Tests\Visual\TestCaseUserProfile.cs" />
<Compile Include="Tests\Visual\TestCaseUserRanks.cs" />
<Compile Include="Tests\Visual\TestCaseWaveform.cs" />
<Compile Include="Users\Avatar.cs" />
<Compile Include="Users\Country.cs" />
<Compile Include="Users\Medal.cs" />
@ -839,9 +791,7 @@
<Compile Include="Overlays\BeatmapSet\BasicStats.cs" />
<Compile Include="Overlays\BeatmapSet\SuccessRate.cs" />
<Compile Include="Overlays\BeatmapSet\PreviewButton.cs" />
<Compile Include="Tests\Visual\TestCaseBeatmapSetOverlay.cs" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
@ -865,4 +815,4 @@
<Import Project="$(SolutionDir)\packages\SQLitePCLRaw.lib.e_sqlite3.osx.1.1.8\build\net35\SQLitePCLRaw.lib.e_sqlite3.osx.targets" Condition="Exists('$(SolutionDir)\packages\SQLitePCLRaw.lib.e_sqlite3.osx.1.1.8\build\net35\SQLitePCLRaw.lib.e_sqlite3.osx.targets')" />
<Import Project="$(SolutionDir)\packages\SQLitePCLRaw.lib.e_sqlite3.linux.1.1.8\build\net35\SQLitePCLRaw.lib.e_sqlite3.linux.targets" Condition="Exists('$(SolutionDir)\packages\SQLitePCLRaw.lib.e_sqlite3.linux.1.1.8\build\net35\SQLitePCLRaw.lib.e_sqlite3.linux.targets')" />
<Import Project="$(SolutionDir)\packages\SQLitePCLRaw.lib.e_sqlite3.v110_xp.1.1.8\build\net35\SQLitePCLRaw.lib.e_sqlite3.v110_xp.targets" Condition="Exists('$(SolutionDir)\packages\SQLitePCLRaw.lib.e_sqlite3.v110_xp.1.1.8\build\net35\SQLitePCLRaw.lib.e_sqlite3.v110_xp.targets')" />
</Project>
</Project>