From 2cb72d40c1345812fc149899c8494264159fdd38 Mon Sep 17 00:00:00 2001 From: Vera Aguilera Puerto Date: Thu, 9 Dec 2021 14:36:32 +0100 Subject: [PATCH] Fix integration tests nullability errors. --- .../Tests/Disposal/DisposalUnitTest.cs | 3 ++- .../Tests/Interaction/Click/InteractionSystemTests.cs | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Content.IntegrationTests/Tests/Disposal/DisposalUnitTest.cs b/Content.IntegrationTests/Tests/Disposal/DisposalUnitTest.cs index 09d4619d40..6625179a59 100644 --- a/Content.IntegrationTests/Tests/Disposal/DisposalUnitTest.cs +++ b/Content.IntegrationTests/Tests/Disposal/DisposalUnitTest.cs @@ -1,3 +1,4 @@ +#nullable enable annotations using System.Linq; using System.Threading.Tasks; using Content.Server.Disposal.Tube.Components; @@ -151,7 +152,7 @@ namespace Content.IntegrationTests.Tests.Disposal Assert.True(entityManager.HasComponent(disposalTrunk)); // Can't insert, unanchored and unpowered - entityManager.GetComponent(unit.Owner).Anchored = false; + entityManager.GetComponent(unit!.Owner).Anchored = false; UnitInsertContains(unit, false, human, wrench, disposalUnit, disposalTrunk); }); diff --git a/Content.IntegrationTests/Tests/Interaction/Click/InteractionSystemTests.cs b/Content.IntegrationTests/Tests/Interaction/Click/InteractionSystemTests.cs index 50f8b25c2d..32088a0739 100644 --- a/Content.IntegrationTests/Tests/Interaction/Click/InteractionSystemTests.cs +++ b/Content.IntegrationTests/Tests/Interaction/Click/InteractionSystemTests.cs @@ -1,3 +1,4 @@ +#nullable enable annotations using System.Threading.Tasks; using Content.Server.Hands.Components; using Content.Server.Interaction; @@ -407,9 +408,9 @@ namespace Content.IntegrationTests.Tests.Interaction.Click [Reflect(false)] private class TestInteractionSystem : EntitySystem { - public ComponentEventHandler AttackEvent; - public EntityEventHandler InteractUsingEvent; - public EntityEventHandler InteractHandEvent; + public ComponentEventHandler? AttackEvent; + public EntityEventHandler? InteractUsingEvent; + public EntityEventHandler? InteractHandEvent; public override void Initialize() {