style(test): use constraint API for length check

This commit is contained in:
Oliver Booth 2023-04-07 01:34:34 +01:00
parent dc6d984fa8
commit ad2d33aa88
No known key found for this signature in database
GPG Key ID: 20BEB9DC87961025
2 changed files with 2 additions and 2 deletions

View File

@ -84,7 +84,7 @@ namespace X10D.Unity.Tests
yield return null;
Rigidbody[] components = rigidbody.GetComponentsInChildrenOnly<Rigidbody>();
Assert.That(components.Length, Is.EqualTo(1));
Assert.That(components, Has.Length.EqualTo(1));
Assert.That(child, Is.EqualTo(components[0].gameObject));
Object.Destroy(parent);

View File

@ -114,7 +114,7 @@ namespace X10D.Unity.Tests
child.AddComponent<Rigidbody>();
Rigidbody[] components = parent.GetComponentsInChildrenOnly<Rigidbody>();
Assert.That(components.Length, Is.EqualTo(1));
Assert.That(components, Has.Length.EqualTo(1));
Assert.That(child, Is.EqualTo(components[0].gameObject));
Object.Destroy(parent);