From b103718bd9751c060e956d0b7c8e4b9ce4f1745c Mon Sep 17 00:00:00 2001 From: Christian Date: Fri, 29 Jan 2021 23:17:16 +0100 Subject: [PATCH] Add Unit Tests. --- .../TopicFilterComparer_Tests.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Tests/MQTTnet.Core.Tests/TopicFilterComparer_Tests.cs b/Tests/MQTTnet.Core.Tests/TopicFilterComparer_Tests.cs index b1de7c8d..5fb3d44e 100644 --- a/Tests/MQTTnet.Core.Tests/TopicFilterComparer_Tests.cs +++ b/Tests/MQTTnet.Core.Tests/TopicFilterComparer_Tests.cs @@ -6,6 +6,20 @@ namespace MQTTnet.Tests [TestClass] public class TopicFilterComparer_Tests { + [TestMethod] + public void TopicFilterComparer_Plus_Match_With_Separator_Only() + { + //A Topic Name or Topic Filter consisting only of the ‘/’ character is valid + CompareAndAssert("A", "+", true); + } + + [TestMethod] + public void TopicFilterComparer_Hash_Match_With_Separator_Only() + { + //A Topic Name or Topic Filter consisting only of the ‘/’ character is valid + CompareAndAssert("/", "#", true); + } + [TestMethod] public void TopicFilterComparer_DirectMatch() {