Playground by Górka Mateusz
Goo.Tests.Editor.Pooling.PoolingObjectsWithCustomParentTests Class Reference
+ Inheritance diagram for Goo.Tests.Editor.Pooling.PoolingObjectsWithCustomParentTests:
+ Collaboration diagram for Goo.Tests.Editor.Pooling.PoolingObjectsWithCustomParentTests:

Public Member Functions

override void SetUp ()
 
void GetObjects_ParentValidation ()
 
void GetObjects_SameParent ()
 
- Public Member Functions inherited from Goo.Tests.Editor.Pooling.PoolingObjectsTests< TestablePooler >
abstract void SetUp ()
 
virtual void TearDown ()
 
void GetObject_Base ()
 
void GetObject_PrefabWithComponents ()
 
void GetObject_Reusability ()
 
void GetObject_NotInRoot ()
 
void GetObject_SameParent ()
 
void GetObject_DefaultPosition ()
 
void GetObject_MultipleGetsNewElements ()
 
void GetObject_MultipleGetExistingElements ()
 

Private Attributes

Transform _parent
 

Static Private Attributes

const string ParentName = "ParentName"
 

Additional Inherited Members

- Protected Member Functions inherited from Goo.Tests.Editor.Pooling.PoolingObjectsTests< TestablePooler >
virtual void FreeObject (GameObject item)
 
- Protected Attributes inherited from Goo.Tests.Editor.Pooling.PoolingObjectsTests< TestablePooler >
GameObject _prefab
 
- Static Protected Attributes inherited from Goo.Tests.Editor.Pooling.PoolingObjectsTests< TestablePooler >
const string Name
 
- Package Attributes inherited from Goo.Tests.Editor.Pooling.PoolingObjectsTests< TestablePooler >
TPooler _pooler
 

Member Function Documentation

◆ SetUp()

override void Goo.Tests.Editor.Pooling.PoolingObjectsWithCustomParentTests.SetUp ( )
inlinevirtual

Implements Goo.Tests.Editor.Pooling.PoolingObjectsTests< TestablePooler >.

13 {
14 _prefab = new GameObject(Name);
15 _parent = (new GameObject(ParentName)).transform;
17 .Set("_prefab", p => p.objectReferenceValue = _prefab)
18 .Set("_parent", p => p.objectReferenceValue = _parent)
19 .Apply()
20 .RunInEditor()
21 .Get();
22 }
TPooler _pooler
Definition: PoolingObjectsTests.cs:25
const string Name
Definition: PoolingObjectsTests.cs:23
GameObject _prefab
Definition: PoolingObjectsTests.cs:26
const string ParentName
Definition: PoolingObjectsWithCustomParentTests.cs:9
Transform _parent
Definition: PoolingObjectsWithCustomParentTests.cs:10
Definition: MonoBehaviourInitializer.cs:9
static MonoBehaviourInitializer< T > Instantiate(string name=null)
Definition: MonoBehaviourInitializer.cs:44

◆ GetObjects_ParentValidation()

void Goo.Tests.Editor.Pooling.PoolingObjectsWithCustomParentTests.GetObjects_ParentValidation ( )
inline
26 {
27 var actual = _pooler.GetObject();
28 Assert.IsNotNull(actual.transform.parent);
29 Assert.AreSame(_parent, actual.transform.parent);
30 }

◆ GetObjects_SameParent()

void Goo.Tests.Editor.Pooling.PoolingObjectsWithCustomParentTests.GetObjects_SameParent ( )
inline
34 {
35 var second = _pooler.GetObject();
36 var first = _pooler.GetObject();
37 Assert.AreSame(first.transform.parent, second.transform.parent);
38 }

Member Data Documentation

◆ ParentName

const string Goo.Tests.Editor.Pooling.PoolingObjectsWithCustomParentTests.ParentName = "ParentName"
staticprivate

◆ _parent

Transform Goo.Tests.Editor.Pooling.PoolingObjectsWithCustomParentTests._parent
private

The documentation for this class was generated from the following file: