Skip to content

Commit

Permalink
fix(tests): networkidentity test failing due to changed exception text
Browse files Browse the repository at this point in the history
  • Loading branch information
SoftwareGuy committed Mar 25, 2022
1 parent 30a3d75 commit 877eb12
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Assets/Tests/Editor/NetworkIdentityCallbackTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,8 @@ public void SetPrefabHash_GivesErrorIfOneExists()
{
identity.PrefabHash = hash2;
});

Assert.That(exception.Message, Is.EqualTo($"Can not Set PrefabHash on NetworkIdentity '{identity.name}' because it already had an PrefabHash, current PrefabHash '{hash1}', attempted new PrefabHash '{hash2}'"));
Assert.That(exception.Message, Is.EqualTo($"Cannot set PrefabHash on NetworkIdentity '{identity.name}' because it already had an PrefabHash. Current PrefabHash is '{hash1}', attempted new PrefabHash is '{hash2}'."));
// guid was changed
Assert.That(identity.PrefabHash, Is.EqualTo(hash1));
}
Expand All @@ -218,7 +218,7 @@ public void SetPrefabHash_GivesErrorForEmptyGuid()
identity.PrefabHash = hash2;
});

Assert.That(exception.Message, Is.EqualTo($"Can not set PrefabHash to empty guid on NetworkIdentity '{identity.name}', old PrefabHash '{hash1}'"));
Assert.That(exception.Message, Is.EqualTo($"Cannot set PrefabHash to an empty guid on NetworkIdentity '{identity.name}'. Old PrefabHash '{hash1}'."));
// guid was NOT changed
Assert.That(identity.PrefabHash, Is.EqualTo(hash1));
}
Expand Down

0 comments on commit 877eb12

Please sign in to comment.