public void GetValueByKey()
        {
            UnityEventListenerMock valueRetrievedListenerMock = new UnityEventListenerMock();

            subject.ValueRetrieved.AddListener(valueRetrievedListenerMock.Listen);

            GameObject keyOne     = new GameObject();
            GameObject valueOne   = new GameObject();
            GameObject keyTwo     = new GameObject();
            GameObject valueTwo   = new GameObject();
            GameObject keyThree   = new GameObject();
            GameObject valueThree = new GameObject();

            GameObjectRelationObservableList relations = containingObject.AddComponent <GameObjectRelationObservableList>();

            subject.Relations = relations;

            GameObjectRelationObservableList.Relation relationOne = new GameObjectRelationObservableList.Relation()
            {
                Key = keyOne, Value = valueOne
            };
            GameObjectRelationObservableList.Relation relationTwo = new GameObjectRelationObservableList.Relation()
            {
                Key = keyTwo, Value = valueTwo
            };
            GameObjectRelationObservableList.Relation relationThree = new GameObjectRelationObservableList.Relation()
            {
                Key = keyThree, Value = valueThree
            };


            subject.Relations.Add(relationOne);
            subject.Relations.Add(relationTwo);
            subject.Relations.Add(relationThree);

            Assert.IsFalse(valueRetrievedListenerMock.Received);

            Assert.AreEqual(valueTwo, subject.GetValue(keyTwo));

            Assert.IsTrue(valueRetrievedListenerMock.Received);

            Object.DestroyImmediate(keyOne);
            Object.DestroyImmediate(valueOne);
            Object.DestroyImmediate(keyTwo);
            Object.DestroyImmediate(valueTwo);
            Object.DestroyImmediate(keyThree);
            Object.DestroyImmediate(valueThree);
        }
        public void GetValueByKey()
        {
            UnityEventListenerMock valueRetrievedListenerMock = new UnityEventListenerMock();

            subject.ValueRetreieved.AddListener(valueRetrievedListenerMock.Listen);

            GameObject keyOne     = new GameObject();
            GameObject valueOne   = new GameObject();
            GameObject keyTwo     = new GameObject();
            GameObject valueTwo   = new GameObject();
            GameObject keyThree   = new GameObject();
            GameObject valueThree = new GameObject();

            GameObjectRelations.Relation relationOne = new GameObjectRelations.Relation()
            {
                key = keyOne, value = valueOne
            };
            GameObjectRelations.Relation relationTwo = new GameObjectRelations.Relation()
            {
                key = keyTwo, value = valueTwo
            };
            GameObjectRelations.Relation relationThree = new GameObjectRelations.Relation()
            {
                key = keyThree, value = valueThree
            };

            subject.relations = new List <GameObjectRelations.Relation>()
            {
                relationOne, relationTwo, relationThree
            };

            Assert.IsFalse(valueRetrievedListenerMock.Received);

            Assert.AreEqual(valueTwo, subject.GetValue(keyTwo));

            Assert.IsTrue(valueRetrievedListenerMock.Received);

            Object.DestroyImmediate(keyOne);
            Object.DestroyImmediate(valueOne);
            Object.DestroyImmediate(keyTwo);
            Object.DestroyImmediate(valueTwo);
            Object.DestroyImmediate(keyThree);
            Object.DestroyImmediate(valueThree);
        }