using System.Collections.Generic; using System.Threading.Tasks; using MQTTnet.Server; namespace MQTTnet.Tests.Mockups { public class TestServerStorage : IMqttServerStorage { public IList Messages = new List(); public Task SaveRetainedMessagesAsync(IList messages) { Messages = messages; return Task.CompletedTask; } public Task> LoadRetainedMessagesAsync() { return Task.FromResult(Messages); } } }