We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c6bee12 commit 4a66622Copy full SHA for 4a66622
SqliteCache.Tests/BasicTests.cs
@@ -119,5 +119,27 @@ public void ExpirationStoredInUtc()
119
Assert.IsNull(cache.Get("key"));
120
}
121
122
+
123
+ [TestMethod]
124
+ public void DoubleDispose()
125
+ {
126
+ using (var cache = CreateDefault(true))
127
128
+ cache.Dispose();
129
+ }
130
131
132
+#if NETCOREAPP3_0_OR_GREATER
133
134
+ public async Task AsyncDispose()
135
136
+ await using (var cache = CreateDefault(true))
137
138
+ await cache.SetAsync("foo", DefaultEncoding.GetBytes("hello"));
139
+ var bytes = await cache.GetAsync("foo");
140
+ CollectionAssert.AreEqual(bytes, DefaultEncoding.GetBytes("hello"));
141
142
143
+#endif
144
145
0 commit comments