public void GetById(string guid, string path) { using (SerializationBlobStorageDataStore dataStore = this.CreateDataStore(this.useBlobListCache)) { IItemData item = dataStore.GetById(Guid.Parse(guid), "master"); Assert.NotNull(item); Assert.Equal(path, item.Name); } }
public void GetChildren(string guid, string path) { using (SerializationBlobStorageDataStore dataStore = this.CreateDataStore(this.useBlobListCache)) { IItemData parentItem = dataStore.GetById(Guid.Parse(guid), "master"); IEnumerable <IItemData> items = dataStore.GetChildren(parentItem); Assert.NotNull(items); Assert.Equal(2, items.Count()); IItemData rootItem = Assert.Single(items, x => x.Name == "Root"); Assert.Equal(1, rootItem.Versions.First().Fields.Count()); IItemFieldValue enCreatedField = rootItem.Versions.FirstOrDefault()?.Fields.FirstOrDefault(x => x.FieldId == Guid.Parse("25bed78c-4957-4165-998a-ca1b52f67497")); Assert.NotNull(enCreatedField?.Value); } }