public void AuditDispatcher_isRoutingkeyMatch_IncorrectMatchWithHashWildcardThreeLevelsWithTrailingText() { // Arrange using (var target = new AuditDispatcher(null, null, options)) { var commandKey = "Test.#.event"; var eventKey = "Test.test.test"; // Act var result = target.isRoutingKeyMatch(commandKey, eventKey); // Assert Assert.IsFalse(result); } }
public void AuditDispatcher_isRoutingkeyMatch_CorrectMatchWithHashWildcardFourLevelsWithLeadingAndTrailingText() { // Arrange using (var target = new AuditDispatcher(null, null, options)) { var commandKey = "Test.#.Event"; var eventKey = "Test.test.tEst.Event"; // Act var result = target.isRoutingKeyMatch(commandKey, eventKey); // Assert Assert.IsTrue(result); } }
public void AuditDispatcher_isRoutingkeyMatch_CorrectMatchWithHashWildcardTwoLevels() { // Arrange using (var target = new AuditDispatcher(null, null, options)) { var commandKey = "#"; var eventKey = "Test.test"; // Act var result = target.isRoutingKeyMatch(commandKey, eventKey); // Assert Assert.IsTrue(result); } }
public void AuditDispatcher_isRoutingkeyMatch_IncorrectMatchWithStarWildcardMultipleLevels() { // Arrange using (var target = new AuditDispatcher(null, null, options)) { var commandKey = "Test.*.event"; var eventKey = "Test.test.anothertest.event"; // Act var result = target.isRoutingKeyMatch(commandKey, eventKey); // Assert Assert.IsFalse(result); } }
public void AuditDispatcher_isRoutingkeyMatch_correctMatchWithStarWildcardAndTrailingText() { // Arrange using (var target = new AuditDispatcher(null, null, options)) { var commandKey = "Test.*.event"; var eventKey = "Test.test.event"; // Act var result = target.isRoutingKeyMatch(commandKey, eventKey); // Assert Assert.IsTrue(result); } }
public void AuditDispatcher_isRoutingkeyMatch_IncorrectMatch() { // Arrange using (var target = new AuditDispatcher(null, null, options)) { var commandKey = "Test"; var eventKey = "Mismatch"; // Act var result = target.isRoutingKeyMatch(commandKey, eventKey); // Assert Assert.IsFalse(result); } }