public void create_by_uri_case_insensitive() { var endpoint = new LocalQueueSettings(new Uri("local://Foo")); endpoint.Mode.ShouldBe(EndpointMode.BufferedInMemory); endpoint.Name.ShouldBe("foo"); }
public void create_by_uri_durable() { var endpoint = new LocalQueueSettings(new Uri("local://durable/foo")); endpoint.Mode.ShouldBe(EndpointMode.Durable); endpoint.Name.ShouldBe("foo"); }
public void create_by_uri_case_insensitive() { var endpoint = new LocalQueueSettings(new Uri("local://Foo")); endpoint.IsDurable.ShouldBeFalse(); endpoint.Name.ShouldBe("foo"); }
public void replay_uri_when_not_durable() { var endpoint = new LocalQueueSettings("foo"); endpoint.Mode = EndpointMode.BufferedInMemory; endpoint.ReplyUri().ShouldBe("local://foo".ToUri()); }
public void reply_uri_when_durable() { var endpoint = new LocalQueueSettings("foo"); endpoint.Mode = EndpointMode.Durable; endpoint.ReplyUri().ShouldBe("local://durable/foo".ToUri()); }
public void replay_uri_when_not_durable() { var endpoint = new LocalQueueSettings("foo"); endpoint.IsDurable = false; endpoint.ReplyUri().ShouldBe("local://foo".ToUri()); }
public void lightweight() { var endpoint = new LocalQueueSettings("foo"); endpoint.IsDurable = true; var expression = new SubscriberConfiguration(endpoint); expression.Lightweight(); endpoint.IsDurable.ShouldBeFalse(); }
public void durably() { var endpoint = new LocalQueueSettings("foo"); endpoint.IsDurable.ShouldBeFalse(); var expression = new SubscriberConfiguration(endpoint); expression.Durably(); endpoint.IsDurable.ShouldBeTrue(); }
public void inline() { var endpoint = new LocalQueueSettings("foo"); endpoint.Mode = EndpointMode.Durable; var expression = new SubscriberConfiguration(endpoint); expression.SendInline(); endpoint.Mode.ShouldBe(EndpointMode.Inline); }
public void buffered_in_memory() { var endpoint = new LocalQueueSettings("foo"); endpoint.Mode = EndpointMode.Durable; var expression = new SubscriberConfiguration(endpoint); expression.BufferedInMemory(); endpoint.Mode.ShouldBe(EndpointMode.BufferedInMemory); }
public void customize_envelope_rules() { var endpoint = new LocalQueueSettings("foo"); var expression = new SubscriberConfiguration(endpoint); expression.CustomizeOutgoing(e => e.Headers.Add("a", "one")); var envelope = ObjectMother.Envelope(); endpoint.Customize(envelope); envelope.Headers["a"].ShouldBe("one"); }
public void customize_per_specific_message_type_parent() { var endpoint = new LocalQueueSettings("foo"); var expression = new SubscriberConfiguration(endpoint); expression.CustomizeOutgoingMessagesOfType <BaseMessage>(e => e.Headers.Add("g", "good")); // Negative Case var envelope1 = new Envelope(new Message1()); endpoint.Customize(envelope1); envelope1.Headers.ContainsKey("g").ShouldBeFalse(); // Positive Case var envelope2 = new Envelope(new ExtendedMessage()); endpoint.Customize(envelope2); envelope2.Headers["g"].ShouldBe("good"); }
public void should_set_the_Uri_in_constructor() { var endpoint = new LocalQueueSettings("foo"); endpoint.Uri.ShouldBe(new Uri("local://foo")); }