Exemple #1
0
        public async Task Add_Throws_Error_When_Called_After_Dispose()
        {
            var instance = new PpcBuffer <object>(ConcurrentBuffer.Unbounded, CancellationToken.None);

#if !NETFRAMEWORK
            await instance.DisposeAsync().ConfigureAwait(false);
#else
            instance.Dispose();
#endif
            Assert.Throws <NullReferenceException>(() => instance.Add(new object(), CancellationToken.None));

            await Task.CompletedTask;
        }