More nullable component fixes (#8659)

This commit is contained in:
Pieter-Jan Briers
2022-06-05 05:22:26 +02:00
committed by GitHub
parent 8e615c743a
commit cb4d5f3e59
4 changed files with 5 additions and 5 deletions

View File

@@ -66,8 +66,8 @@ namespace Content.IntegrationTests.Tests.GameObjects.Components.ActionBlocking
entityManager.GetComponent<TransformComponent>(human).WorldPosition = entityManager.GetComponent<TransformComponent>(otherHuman).WorldPosition;
// Test for components existing
Assert.True(entityManager.TryGetComponent(human, out cuffed), $"Human has no {nameof(CuffableComponent)}");
Assert.True(entityManager.TryGetComponent(human, out hands), $"Human has no {nameof(HandsComponent)}");
Assert.True(entityManager.TryGetComponent(human, out cuffed!), $"Human has no {nameof(CuffableComponent)}");
Assert.True(entityManager.TryGetComponent(human, out hands!), $"Human has no {nameof(HandsComponent)}");
Assert.True(entityManager.TryGetComponent(human, out SharedBodyComponent? _), $"Human has no {nameof(SharedBodyComponent)}");
Assert.True(entityManager.TryGetComponent(cuffs, out HandcuffComponent? _), $"Handcuff has no {nameof(HandcuffComponent)}");
Assert.True(entityManager.TryGetComponent(secondCuffs, out HandcuffComponent? _), $"Second handcuffs has no {nameof(HandcuffComponent)}");