mirror of https://github.com/oliverbooth/X10D
style(test): use constraint API for length check
This commit is contained in:
parent
dc6d984fa8
commit
ad2d33aa88
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue