public void TestKeyAndValueAndNext() { List <(StorageKey, StorageItem)> list = new List <(StorageKey, StorageItem)>(); StorageKey storageKey = new StorageKey(); storageKey.Key = new byte[1]; StorageItem storageItem = new StorageItem(); storageItem.Value = new byte[1]; list.Add((storageKey, storageItem)); StorageIterator storageIterator = new StorageIterator(list.GetEnumerator(), FindOptions.ValuesOnly, null); storageIterator.Next(); Assert.AreEqual(new ByteString(new byte[1]), storageIterator.Value()); }
public void TestKeyAndValueAndNext() { List <KeyValuePair <StorageKey, StorageItem> > list = new List <KeyValuePair <StorageKey, StorageItem> >(); StorageKey storageKey = new StorageKey(); storageKey.Key = new byte[1]; StorageItem storageItem = new StorageItem(); storageItem.Value = new byte[1]; list.Add(new KeyValuePair <StorageKey, StorageItem>(storageKey, storageItem)); StorageIterator storageIterator = new StorageIterator(list.GetEnumerator()); storageIterator.Next(); Assert.AreEqual(new ByteArray(new byte[1]), storageIterator.Key()); Assert.AreEqual(new ByteArray(new byte[1]), storageIterator.Value()); }