public void Cache_3SharedComponents() { var cache1 = new TestCache3(); Assert.IsNull(cache1.Create(value: null).Value); var s = new[] { "s1", "s2", "s3", "s4", "s5" }; var ref0 = cache1.Create(s); Assert.IsTrue(s.SequenceEqual(ref0.Value)); }
public void Cache_3SharedComponents_Dummies() { var dummyCache = new DummyCache <string>(); var cache = new TestCache3(dummyCache, dummyCache, dummyCache); var s = new[] { "s1", "s2", "s3", "s4", "s5" }; var ref1 = cache.Create(s); Assert.IsTrue(s.SequenceEqual(ref1.Value)); }
public void Cache_3SharedComponents_GetValueAfterDispose() { var cache = new TestCache3(); var s = new[] { "s1", "s2", "s3", "s4", "s5" }; var ref0 = cache.Create(s); ref0.Dispose(); var unused = default(string[]); Assert.ThrowsException <ObjectDisposedException>(() => unused = ref0.Value); }