public void TestNestedCollectionConstruction() { var container = new AssetPropertyGraphContainer(new PackageSession(), new AssetNodeContainer()); var asset = new Types.MyAsset7 { MyAsset2 = new Types.MyAsset2 { MyStrings = { "aaa", "bbb", "ccc" } } }; var assetItem = new AssetItem("MyAsset", asset); var graph = AssetQuantumRegistry.ConstructPropertyGraph(container, assetItem, null); Assert.IsAssignableFrom<AssetNode>(graph.RootNode); CollectionItemIdentifiers ids; Assert.True(CollectionItemIdHelper.TryGetCollectionItemIds(asset.MyAsset2.MyStrings, out ids)); Assert.AreEqual(3, ids.KeyCount); Assert.AreEqual(0, ids.DeletedCount); Assert.True(ids.ContainsKey(0)); Assert.True(ids.ContainsKey(1)); Assert.True(ids.ContainsKey(2)); }
public void TestNestedCollectionConstruction() { var container = new AssetPropertyGraphContainer(new PackageSession(), new AssetNodeContainer()); var asset = new Types.MyAsset7 { MyAsset2 = new Types.MyAsset2 { MyStrings = { "aaa", "bbb", "ccc" } } }; var assetItem = new AssetItem("MyAsset", asset); var graph = AssetQuantumRegistry.ConstructPropertyGraph(container, assetItem, null); Assert.IsAssignableFrom <AssetNode>(graph.RootNode); CollectionItemIdentifiers ids; Assert.True(CollectionItemIdHelper.TryGetCollectionItemIds(asset.MyAsset2.MyStrings, out ids)); Assert.AreEqual(3, ids.KeyCount); Assert.AreEqual(0, ids.DeletedCount); Assert.True(ids.ContainsKey(0)); Assert.True(ids.ContainsKey(1)); Assert.True(ids.ContainsKey(2)); }