mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 08:33:21 +08:00
Add more test case
This commit is contained in:
parent
44d540eb53
commit
356f5dceef
@ -10,20 +10,30 @@ namespace osu.Game.Tests.Localisation
|
||||
public class BeatmapMetadataRomanisationTest
|
||||
{
|
||||
[Test]
|
||||
public void TestNoUnicode()
|
||||
public void TestRomanisation()
|
||||
{
|
||||
var beatmap = new Beatmap
|
||||
var metadata = new BeatmapMetadata
|
||||
{
|
||||
BeatmapInfo = new BeatmapInfo
|
||||
{
|
||||
Metadata = new BeatmapMetadata
|
||||
{
|
||||
Artist = "Artist",
|
||||
Title = "Romanised title"
|
||||
}
|
||||
}
|
||||
Artist = "Romanised Artist",
|
||||
ArtistUnicode = "Unicode Artist",
|
||||
Title = "Romanised title",
|
||||
TitleUnicode = "Unicode Title"
|
||||
};
|
||||
var romanisableString = beatmap.Metadata.ToRomanisableString();
|
||||
var romanisableString = metadata.ToRomanisableString();
|
||||
|
||||
Assert.AreEqual(metadata.ToString(), romanisableString.Romanised);
|
||||
Assert.AreEqual($"{metadata.ArtistUnicode} - {metadata.TitleUnicode}", romanisableString.Original);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestRomanisationNoUnicode()
|
||||
{
|
||||
var metadata = new BeatmapMetadata
|
||||
{
|
||||
Artist = "Romanised Artist",
|
||||
Title = "Romanised title"
|
||||
};
|
||||
var romanisableString = metadata.ToRomanisableString();
|
||||
|
||||
Assert.AreEqual(romanisableString.Romanised, romanisableString.Original);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user