Exemple #1
0
        public void can_build_uri_different_app(PreSharedKeyCredentials impl)
        {
            var first  = impl.BuildUri("app2");
            var second = FormatUri("app2");

            first.PathAndQuery.ShouldEqual(second.PathAndQuery);
        }
		public void can_create_new_configuration_instance_with_app2(
			PreSharedKeyCredentials impl)
		{
			var credentials = impl.WithApplication("app3");
			credentials.Application.ShouldEqual("app3");
			credentials.IssuerName.ShouldEqual(impl.IssuerName);
			credentials.Key.ShouldEqual(impl.Key);
			credentials.Namespace.ShouldEqual(impl.Namespace);
		}
Exemple #3
0
 /// <summary>
 /// Configure MassTransit to consume from Azure Service Bus.
 /// </summary>
 public static void ReceiveFromComponents <T>(this T configurator,
                                              [NotNull] PreSharedKeyCredentials creds)
     where T : ServiceBusConfigurator
 {
     if (creds == null)
     {
         throw new ArgumentNullException("creds");
     }
     configurator.ReceiveFrom(creds.BuildUri());
 }
Exemple #4
0
        public void can_create_new_configuration_instance_with_app2(
            PreSharedKeyCredentials impl)
        {
            var credentials = impl.WithApplication("app3");

            credentials.Application.ShouldEqual("app3");
            credentials.IssuerName.ShouldEqual(impl.IssuerName);
            credentials.Key.ShouldEqual(impl.Key);
            credentials.Namespace.ShouldEqual(impl.Namespace);
        }
 /// <summary>
 /// Create a new testing scenario with Azure Service Bus.
 /// Note: currently recommended to use the loopback scenario builder.
 /// </summary>
 public static void UseAzureServiceBusBusScenario(
     [NotNull] this TestInstanceConfigurator <BusTestScenario> configurator,
     [NotNull] PreSharedKeyCredentials credentials)
 {
     if (configurator == null)
     {
         throw new ArgumentNullException("configurator");
     }
     if (credentials == null)
     {
         throw new ArgumentNullException("credentials");
     }
     configurator.UseScenarioBuilder(() => new AzureServiceBusScenarioBuilder(credentials));
 }
		public void can_build_uri_different_app(PreSharedKeyCredentials impl)
		{
			var first = impl.BuildUri("app2");
			var second = FormatUri("app2");
			first.PathAndQuery.ShouldEqual(second.PathAndQuery);
		}
 public AzureServiceBusScenarioBuilder([NotNull] PreSharedKeyCredentials credentials)
     : base(credentials.BuildUri())
 {
     ConfigureEndpointFactory(x => x.UseAzureServiceBus());
     ConfigureBus(x => x.UseAzureServiceBusRouting());
 }