You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

27 lines
822 B

  1. // Licensed to the .NET Foundation under one or more agreements.
  2. // The .NET Foundation licenses this file to you under the MIT license.
  3. // See the LICENSE file in the project root for more information.
  4. using System;
  5. using System.Threading.Tasks;
  6. using Microsoft.VisualStudio.TestTools.UnitTesting;
  7. using MQTTnet.Formatter;
  8. using MQTTnet.Tests.Mockups;
  9. namespace MQTTnet.Tests
  10. {
  11. public abstract class BaseTestClass
  12. {
  13. public TestContext TestContext { get; set; }
  14. protected TestEnvironment CreateTestEnvironment(MqttProtocolVersion protocolVersion = MqttProtocolVersion.V311)
  15. {
  16. return new TestEnvironment(TestContext, protocolVersion);
  17. }
  18. protected Task LongTestDelay()
  19. {
  20. return Task.Delay(TimeSpan.FromSeconds(1));
  21. }
  22. }
  23. }