mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 07:32:55 +08:00
Fix usage of _ in Moq lambdas
This commit is contained in:
parent
6a1e4ff99f
commit
c0318a4d3e
@ -37,8 +37,8 @@ namespace osu.Game.Tests.Editing.Checks
|
||||
beatmap.Metadata.AudioFile = null;
|
||||
|
||||
var mock = new Mock<IWorkingBeatmap>();
|
||||
mock.SetupGet(_ => _.Beatmap).Returns(beatmap);
|
||||
mock.SetupGet(_ => _.Track).Returns((Track)null);
|
||||
mock.SetupGet(w => w.Beatmap).Returns(beatmap);
|
||||
mock.SetupGet(w => w.Track).Returns((Track)null);
|
||||
|
||||
Assert.That(check.Run(beatmap, mock.Object), Is.Empty);
|
||||
}
|
||||
@ -102,11 +102,11 @@ namespace osu.Game.Tests.Editing.Checks
|
||||
private Mock<IWorkingBeatmap> getMockWorkingBeatmap(int? audioBitrate)
|
||||
{
|
||||
var mockTrack = new Mock<Track>();
|
||||
mockTrack.SetupGet(_ => _.Bitrate).Returns(audioBitrate);
|
||||
mockTrack.SetupGet(t => t.Bitrate).Returns(audioBitrate);
|
||||
|
||||
var mockWorkingBeatmap = new Mock<IWorkingBeatmap>();
|
||||
mockWorkingBeatmap.SetupGet(_ => _.Beatmap).Returns(beatmap);
|
||||
mockWorkingBeatmap.SetupGet(_ => _.Track).Returns(mockTrack.Object);
|
||||
mockWorkingBeatmap.SetupGet(w => w.Beatmap).Returns(beatmap);
|
||||
mockWorkingBeatmap.SetupGet(w => w.Track).Returns(mockTrack.Object);
|
||||
|
||||
return mockWorkingBeatmap;
|
||||
}
|
||||
|
@ -120,9 +120,9 @@ namespace osu.Game.Tests.Editing.Checks
|
||||
var stream = new MemoryStream(fileBytes ?? new byte[1024 * 1024]);
|
||||
|
||||
var mock = new Mock<IWorkingBeatmap>();
|
||||
mock.SetupGet(_ => _.Beatmap).Returns(beatmap);
|
||||
mock.SetupGet(_ => _.Background).Returns(background);
|
||||
mock.Setup(_ => _.GetStream(It.IsAny<string>())).Returns(stream);
|
||||
mock.SetupGet(w => w.Beatmap).Returns(beatmap);
|
||||
mock.SetupGet(w => w.Background).Returns(background);
|
||||
mock.Setup(w => w.GetStream(It.IsAny<string>())).Returns(stream);
|
||||
|
||||
return mock;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user