mirror of https://github.com/ppy/osu
Attach comment explaining purpose of `CallBase`
This commit is contained in:
parent
fd20c2bdcd
commit
858c8f927f
|
@ -72,7 +72,11 @@ public void TestTexturePriorities(string[] textureFilenames, string priorityLook
|
|||
{
|
||||
var skin = new Mock<ISkinSource>();
|
||||
|
||||
// shouldn't be required as GetTexture(string) calls GetTexture(string, WrapMode, WrapMode) by default,
|
||||
// but moq doesn't handle that well, therefore explicitly requiring to use `CallBase`:
|
||||
// https://github.com/moq/moq4/issues/972
|
||||
skin.Setup(s => s.GetTexture(It.IsAny<string>())).CallBase();
|
||||
|
||||
skin.Setup(s => s.GetTexture(It.IsIn(textureFilenames), It.IsAny<WrapMode>(), It.IsAny<WrapMode>()))
|
||||
.Returns((string componentName, WrapMode _, WrapMode __) => new Texture(1, 1) { AssetName = componentName });
|
||||
|
||||
|
|
Loading…
Reference in New Issue