public void TestTryGetInternal() { MyValue value = myMetaCache.GetAndChange(); value.Value = "value1"; cloneMetaCache.Get().Should().Be(value); }
public void TestCommitAndAddInternal() { MyValue value = myMetaCache.Get(); value.Should().NotBeNull(); value.Value.Should().BeNull(); myMetaCache.Commit(); myMetaCache.Value.Should().Be(value); }
public void TestCommitAndUpdateInternal() { MyValue value = myMetaCache.GetAndChange(); value.Value = "value1"; myMetaCache.Commit(); myMetaCache.Value.Should().Be(value); myMetaCache.Value.Value.Should().Be("value1"); }
public void TestUpdateInternal() { MyValue value = myMetaCache.GetAndChange(); value.Value = "value1"; MyValue value2 = cloneMetaCache.GetAndChange(); value2.Value = "value2"; cloneMetaCache.Commit(); value.Value.Should().Be("value2"); }
protected override void UpdateInternal(StorageKey key, StorageItem value) { InnerDict[key] = new MyValue(value.Value); }