]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix IComponentFactory mock in benchmark (#29015)
authorLeon Friedrich <60421075+ElectroJr@users.noreply.github.com>
Sat, 15 Jun 2024 06:42:25 +0000 (18:42 +1200)
committerGitHub <noreply@github.com>
Sat, 15 Jun 2024 06:42:25 +0000 (16:42 +1000)
Content.Benchmarks/EntityManagerGetAllComponents.cs

index 0b9683a4abb6ce787decc230f55f8e16c67481e3..8e02b8d71de6869b713c52dd442ec5ab092152a0 100644 (file)
@@ -47,6 +47,7 @@ namespace Content.Benchmarks
 
             var componentFactory = new Mock<IComponentFactory>();
             componentFactory.Setup(p => p.GetComponent<DummyComponent>()).Returns(new DummyComponent());
+            componentFactory.Setup(m => m.GetIndex(typeof(DummyComponent))).Returns(CompIdx.Index<DummyComponent>());
             componentFactory.Setup(p => p.GetRegistration(It.IsAny<DummyComponent>())).Returns(dummyReg);
             componentFactory.Setup(p => p.GetAllRegistrations()).Returns(new[] { dummyReg });
             componentFactory.Setup(p => p.GetAllRefTypes()).Returns(new[] { CompIdx.Index<DummyComponent>() });