From d2093f3c74759514d86da2e60fdf89db1ec84ab1 Mon Sep 17 00:00:00 2001 From: Savorboard Date: Thu, 12 Dec 2019 11:31:44 +0800 Subject: [PATCH] Fix build errorFix unit tests --- .../ConsumerServiceSelectorTest.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/test/DotNetCore.CAP.Test/ConsumerServiceSelectorTest.cs b/test/DotNetCore.CAP.Test/ConsumerServiceSelectorTest.cs index c84bb64..5f5fd62 100644 --- a/test/DotNetCore.CAP.Test/ConsumerServiceSelectorTest.cs +++ b/test/DotNetCore.CAP.Test/ConsumerServiceSelectorTest.cs @@ -63,7 +63,6 @@ namespace DotNetCore.CAP.Test [InlineData("Candidates.Asterisk.AAA")] [InlineData("AAA.BBB.CCC.Asterisk")] [InlineData("aaa.BBB.ccc.Asterisk")] - [InlineData("Asterisk.aaa.bbb")] public void CanNotFindAsteriskTopic(string topic) { var selector = _provider.GetRequiredService(); @@ -73,6 +72,17 @@ namespace DotNetCore.CAP.Test Assert.Null(bestCandidates); } + [Theory] + [InlineData("Asterisk.aaa.bbb")] + public void CanNotFindAsteriskTopic2(string topic) + { + var selector = _provider.GetRequiredService(); + var candidates = selector.SelectCandidates(); + + var bestCandidates = selector.SelectBestCandidate(topic, candidates); + Assert.Null(bestCandidates); + } + [Theory] [InlineData("Candidates.Pound.AAA")] [InlineData("Candidates.Pound.AAA.BBB")]