Add test coverage and handle null creator

This commit is contained in:
Dean Herbert
2020-04-22 09:19:34 +09:00
parent 0c74f1aaa9
commit 360c9f8e38
2 changed files with 66 additions and 1 deletions

View File

@ -53,7 +53,11 @@ namespace osu.Game.Beatmaps
public string AudioFile { get; set; }
public string BackgroundFile { get; set; }
public override string ToString() => $"{Artist} - {Title} ({Author})";
public override string ToString()
{
string author = Author == null ? string.Empty : $"({Author})";
return $"{Artist} - {Title} {author}".Trim();
}
[JsonIgnore]
public string[] SearchableTerms => new[]