public void BrokerName_IsSet() { var exchange = new MockDirectExchange(); exchange.Setup(); exchange.Settings.BrokerName.Should().Be("MockTestBrokerName"); }
public void DirectExchange_NotAutoDeleteByDefault() { var exchange = new MockDirectExchange(); exchange.Setup(); exchange.Settings.IsAutoDelete.Should().BeFalse(); }
public void JsonSerialization_UsedByDefault() { var exchange = new MockDirectExchange(); exchange.Setup(); exchange.Settings.ContentType.Should().Be(SerializerTypes.Json); }
public void DirectExchange_DurableByDefault() { var exchange = new MockDirectExchange(); exchange.Setup(); exchange.Settings.IsDurable.Should().BeTrue(); }
public void MultipleQueues_CanBeCreated() { var exchange = new MockDirectExchange { FirstQueueName = "FirstMockTestQueue", SecondQueueName = "SecondMockTestQueue" }; exchange.Setup(); exchange.Queues.Should().HaveCount(2); }
public void DirectExchangeQueues_MustHaveAtLeastOneRouteKey() { var exchange = new MockDirectExchange { FirstQueueName = "FirstMockTestQueue", FirstQueueRouteKeys = new string[] { } }; Assert.Throws <BrokerException>(() => exchange.Setup()).Message .Should().Contain("must have a route-key specified"); }
public void QueuesCanBeCreated_WhenExchangeCreated() { var exchange = new MockDirectExchange { FirstQueueName = "FirstMockTestQueue" }; exchange.Setup(); exchange.Queues.Should().HaveCount(1); exchange.Queues.First().QueueName.Should().Be("FirstMockTestQueue"); }
public void DirectExchangeQueues_NotExclusiveByDefault() { var exchange = new MockDirectExchange { FirstQueueName = "FirstMockTestQueue" }; exchange.Setup(); exchange.Queues.First().Settings.IsExclusive.Should().BeFalse(); }
public void DirectExchangeQueues_DurableByDefault() { var exchange = new MockDirectExchange { FirstQueueName = "FirstMockTestQueue" }; exchange.Setup(); exchange.Queues.First().Settings.IsDurable.Should().BeTrue(); }
public void DirectExchangeQueues_RequiresAckByDefault() { var exchange = new MockDirectExchange { FirstQueueName = "FirstMockTestQueue" }; exchange.Setup(); exchange.Queues.First().Settings.IsNoAck.Should().BeFalse(); }