From 489fa6ba1bb58581f20c9eb9bb96b8d660db3853 Mon Sep 17 00:00:00 2001 From: Marcin Hoppe Date: Fri, 12 Aug 2016 13:17:26 +0200 Subject: [PATCH] Update NServiceBus to 6.0.0-Beta7 --- packaging/nuget/NServiceBus.SqlServer.nuspec | 2 +- .../Routing/When_broadcasting_a_command.cs | 103 ---- .../When_extending_sendoptions.cs | 2 +- .../When_extending_the_publish_api.cs | 2 +- .../Audit/When_a_message_is_audited.cs | 0 .../Audit/When_a_replymessage_is_audited.cs | 0 .../Audit/When_audit_is_overridden_in_code.cs | 0 .../Audit/When_auditing.cs | 0 ..._auditing_message_with_TimeToBeReceived.cs | 0 .../Basic/When_aborting_the_behavior_chain.cs | 0 .../Basic/When_deferring_to_non_local.cs | 0 .../Basic/When_depending_on_typed_feature.cs | 0 .../When_depending_on_untyped_feature.cs | 0 .../Basic/When_extending_behavior_context.cs | 2 +- .../When_handling_current_message_later.cs | 7 +- ...ng_message_with_several_messagehandlers.cs | 0 .../Basic/When_multiple_mappings_exists.cs | 0 .../Basic/When_no_content_type.cs | 0 ...ing_unobtrusive_message_without_handler.cs | 65 +++ ...ving_with_catch_all_handlers_registered.cs | 0 .../When_registering_handlers_explicitly.cs | 0 .../Basic/When_sending_from_a_send_only.cs | 0 ...ding_interface_message_with_conventions.cs | 76 +++ .../Basic/When_sending_to_another_endpoint.cs | 0 .../Basic/When_sending_with_conventions.cs | 0 .../Basic/When_using_a_greedy_convention.cs | 0 .../BestPractices/When_publishing_command.cs | 0 ...blishing_command_bestpractices_disabled.cs | 0 ...mand_bestpractices_disabled_on_endpoint.cs | 0 .../BestPractices/When_sending_event.cs | 0 ...n_sending_events_bestpractices_disabled.cs | 0 ...ents_bestpractices_disabled_on_endpoint.cs | 0 .../When_subscribing_to_command.cs | 0 ...mand_bestpractices_disabled_on_endpoint.cs | 0 .../When_unsubscribing_to_command.cs | 0 ...mand_bestpractices_disabled_on_endpoint.cs | 0 .../Causation/When_a_message_is_audited.cs | 0 .../Causation/When_a_message_is_faulted.cs | 0 .../Causation/When_a_message_is_sent.cs | 0 ...injecting_message_session_into_handlers.cs | 0 ..._only_abstract_config_override_is_found.cs | 0 .../Config/When_startup_is_complete.cs | 0 .../ConfigureEndpointInMemoryPersistence.cs | 0 .../ConfigureEndpointMsmqTransport.cs | 0 .../ConventionEnforcementTests.cs | 0 ..._received_message_without_correlationid.cs | 0 .../When_sending_with_no_correlation_id.cs | 0 .../When_using_a_custom_correlation_id.cs | 0 .../When_raising_critical_error.cs | 0 .../When_sending_databus_properties.cs | 0 ...ing_databus_properties_with_unobtrusive.cs | 84 ++++ .../DataBus/When_using_custom_IDataBus.cs | 0 .../When_TimeoutManager_is_disabled.cs | 0 .../When_timeout_dispatch_fails.cs | 0 ..._dispatch_fails_on_timeout_data_removal.cs | 0 .../When_timeout_storage_fails.cs | 0 .../When_Deferring_a_message.cs | 0 .../When_deferring_a_message_to_the_past.cs | 0 .../DeterministicGuid.cs | 0 .../When_using_Rijndael_with_config.cs | 0 .../When_using_Rijndael_with_custom.cs | 0 .../When_using_Rijndael_with_multikey.cs | 0 ...en_using_Rijndael_with_unobtrusive_mode.cs | 139 ++++++ ...ijndael_without_incoming_key_identifier.cs | 0 ...en_using_encryption_with_custom_service.cs | 0 .../EndpointTemplates/ConfigureExtensions.cs | 0 .../EndpointTemplates/DefaultPublisher.cs | 0 .../EndpointTemplates/DefaultServer.cs | 7 +- ...intCustomizationConfigurationExtensions.cs | 0 ...rverWithNoDefaultPersistenceDefinitions.cs | 0 .../When_ForwardReceivedMessagesTo_is_set.cs | 0 .../Hosting/When_a_message_is_audited.cs | 0 .../Hosting/When_a_message_is_faulted.cs | 0 .../Hosting/When_feature_overrides_hostid.cs | 0 .../When_feature_overrides_hostinfo.cs | 0 .../When_overriding_input_queue_name.cs} | 8 +- .../When_sending_ensure_proper_headers.cs | 0 .../Licensing/When_a_message_is_audited.cs | 0 .../When_message_has_empty_id_header.cs | 4 +- .../When_message_has_no_id_header.cs | 4 +- .../Mutators/Issue_1980.cs | 0 ...When_defining_outgoing_message_mutators.cs | 0 ...n_incoming_mutator_changes_message_type.cs | 0 .../Mutators/When_mutating.cs | 0 ...When_outgoing_mutator_replaces_instance.cs | 0 .../When_using_outgoing_tm_mutator.cs | 0 .../NServiceBusAcceptanceTest.cs | 0 .../NonTx/When_sending_inside_ambient_tx.cs | 2 +- .../CriticalTime/When_CriticalTime_enabled.cs | 0 .../CriticalTime/When_deferring_a_message.cs | 0 .../When_slow_with_CriticalTime_enabled.cs | 0 .../SLA/When_sending_slow_with_SLA_enabled.cs | 0 .../SLA/When_sending_with_SLA_enabled.cs | 0 .../When_TimeToBeReceived_has_expired.cs | 0 ...TimeToBeReceived_has_expired_convention.cs | 2 +- .../When_TimeToBeReceived_has_not_expired.cs | 0 ...ToBeReceived_used_with_unobtrusive_mode.cs | 119 +++++ .../Performance/When_message_is_audited.cs | 0 .../Performance/When_message_is_faulted.cs | 0 .../Pipeline/When_replacing_behavior.cs | 4 +- ...using_per_uow_component_in_the_pipeline.cs | 0 .../Retries/When_Subscribing_to_errors.cs | 46 +- ...hen_custom_policy_always_moves_to_error.cs | 0 ...ngle_delayed_retry_before_move_to_error.cs | 0 .../Retries/When_custom_policy_executed.cs | 0 .../Retries/When_custom_policy_provided.cs | 0 .../When_delayed_retries_and_counting.cs} | 18 +- ...etries_with_immediate_retries_disabled.cs} | 16 +- ...delayed_retries_with_regular_exception.cs} | 16 +- ...d_retries_with_serialization_exception.cs} | 15 +- .../When_fails_with_retries_set_to_0.cs | 9 +- ...mmediate_retries_with_default_settings.cs} | 2 +- .../When_immediate_retries_with_dtc_on.cs} | 15 +- ...diate_retries_with_native_transactions.cs} | 14 +- .../Retries/When_message_fails_retries.cs | 0 ..._deferred_by_delayed_retries_using_dtc.cs} | 14 +- .../Retries/when_immediate_retries_fail.cs} | 31 +- ..._policy_moves_to_overridden_error_queue.cs | 0 .../When_error_is_overridden_in_code.cs | 7 +- .../When_message_is_moved_to_error_queue.cs | 0 ...ssage_is_moved_to_error_queue_using_dtc.cs | 0 ..._error_queue_with_header_customizations.cs | 0 ...hen_message_with_TimeToBeReceived_fails.cs | 7 +- .../When_a_duplicate_message_arrives.cs | 0 .../Outbox/When_a_message_is_audited.cs | 4 +- .../When_blowing_up_just_after_dispatch.cs | 4 +- .../Outbox/When_clearing_saga_timeouts.cs | 0 .../When_dispatching_forwarded_messages.cs | 2 +- .../Outbox/When_receiving_a_message.cs | 0 .../When_sending_from_a_non_dtc_endpoint.cs | 0 .../When_starting_an_endpoint_with_a_saga.cs | 10 +- ...oint_with_a_saga_autosubscribe_disabled.cs | 4 +- ...starting_an_endpoint_with_autoSubscribe.cs | 4 +- .../Routing/SubscriptionBehavior.cs | 0 .../Routing/SubscriptionBehaviorExtensions.cs | 0 .../Routing/SubscriptionEventArgs.cs | 0 .../When_base_event_from_2_publishers.cs | 0 ...nfigure_routes_for_unobtrusive_messages.cs | 100 ++++ ...ists_but_routing_information_is_missing.cs | 0 ...lymorphic_event_on_multicast_transports.cs | 0 ...polymorphic_event_on_unicast_transports.cs | 4 +- .../Routing/When_publishing.cs | 0 ...t_implementing_two_unrelated_interfaces.cs | 0 .../Routing/When_publishing_an_interface.cs | 2 +- ...ublishing_an_interface_with_unobtrusive.cs | 108 +++++ .../Routing/When_publishing_from_sendonly.cs | 0 ...out_subscribers_on_multicast_transports.cs | 0 ...d_out_subscribers_on_unicast_transports.cs | 4 +- .../When_publishing_using_root_type.cs | 0 ...lishing_with_only_local_messagehandlers.cs | 0 ...ublishing_with_overridden_local_address.cs | 0 ...stering_publishers_unobtrusive_messages.cs | 138 ++++++ .../Routing/When_replying_to_message.cs | 5 +- ...When_replying_to_message_with_interface.cs | 95 ++++ ...When_subscribing_to_a_polymorphic_event.cs | 0 ...aled_out_publisher_on_unicast_transport.cs | 69 +++ ...embly_level_message_mapping_for_pub_sub.cs | 6 +- .../Routing/When_using_instance_ids.cs | 0 ...on_combined_with_message_driven_pub_sub.cs | 0 ..._to_a_message_sent_to_specific_instance.cs | 0 .../RunDescriptorExtensions.cs | 0 ..._base_class_mapped_is_handled_by_a_saga.cs | 90 ++++ ...hen_a_base_class_message_starts_a_saga.cs} | 27 +- .../When_a_existing_saga_instance_exists.cs | 0 .../Sagas/When_a_finder_exists.cs | 0 ...er_exists_and_context_information_added.cs | 0 .../When_a_finder_exists_and_found_saga.cs | 0 .../When_an_endpoint_replies_to_a_saga.cs | 0 ...hen_auto_correlated_property_is_changed.cs | 0 ...en_doing_request_response_between_sagas.cs | 0 ..._between_sagas_first_handler_responding.cs | 0 ...tween_sagas_response_from_noninitiating.cs | 0 ...est_response_between_sagas_with_timeout.cs | 0 .../When_forgetting_to_set_a_corr_property.cs | 0 .../Sagas/When_message_has_a_saga_id.cs | 0 .../When_receiving_that_completes_the_saga.cs | 0 ...When_receiving_that_should_start_a_saga.cs | 0 ...t_should_start_a_saga_with_interception.cs | 0 ...hould_start_a_saga_without_interception.cs | 0 ..._replies_to_message_published_by_a_saga.cs | 13 +- .../When_saga_handles_unmapped_message.cs | 0 .../When_saga_has_a_non_empty_constructor.cs | 0 .../Sagas/When_saga_id_changed.cs | 0 ...en_saga_is_mapped_to_complex_expression.cs | 0 ...a_message_goes_through_delayed_retries.cs} | 20 +- .../Sagas/When_sagas_cant_be_found.cs | 0 .../Sagas/When_sending_from_a_saga_handle.cs | 0 .../Sagas/When_sending_from_a_saga_timeout.cs | 0 ...n_started_by_base_event_from_other_saga.cs | 0 ...When_started_by_event_from_another_saga.cs | 0 .../Sagas/When_timeout_hit_not_found_saga.cs | 0 ...n_two_sagas_subscribe_to_the_same_event.cs | 0 ..._updating_existing_correlation_property.cs | 0 .../Sagas/When_using_ReplyToOriginator.cs | 0 ...en_using_a_received_message_for_timeout.cs | 0 .../Sagas/When_using_contain_saga_data.cs | 0 .../Sagas/when_receiving_multiple_timeouts.cs | 0 .../when_reply_from_saga_not_found_handler.cs | 0 .../Satellites/When_a_message_is_available.cs | 10 +- .../AllOutboxCapableStorages.cs | 0 .../ScenarioDescriptors/AllTransports.cs | 0 .../ScenarioDescriptors/Builders.cs | 0 .../ScenarioDescriptors/EnvironmentHelper.cs | 0 .../ScenarioDescriptors/Persistence.cs | 0 .../ScenarioDescriptors/Serializers.cs | 0 .../ScenarioDescriptors/Transports.cs | 0 .../When_scheduling_a_recurring_task.cs | 0 .../When_running_saga_tests.cs | 0 .../When_configuring_custom_xml_namespace.cs | 0 ...en_registering_additional_deserializers.cs | 40 +- .../When_registering_custom_serializer.cs | 30 +- ...registering_deserializers_with_settings.cs | 140 ++++++ .../When_sanitizing_xml_messages.cs | 0 .../Serialization/When_skip_wrapping_xml.cs | 0 .../When_wrapping_is_not_skipped.cs | 0 .../Timeout/CyclingOutageTimeoutPersister.cs | 0 ...eout_storage_is_unavailable_temporarily.cs | 0 .../Tx/FakePromotableResourceManager.cs | 0 ...immediate_dispatch_using_scope_suppress.cs | 0 ...g_immediate_dispatch_with_at_least_once.cs | 0 ...ng_immediate_dispatch_with_at_most_once.cs | 0 ...ng_immediate_dispatch_with_exactly_once.cs | 0 .../Tx/Issue_2481.cs | 0 .../Tx/When_receiving_with_dtc_enabled.cs | 0 ...ing_with_native_multi_queue_transaction.cs | 0 ...hen_receiving_with_the_default_settings.cs | 0 ...n_sending_within_an_ambient_transaction.cs | 0 .../UnicastPubSubExtensions.cs | 2 +- ...iple_versions_of_a_message_is_published.cs | 0 ..._with_bracketed_transport_discriminator.cs | 2 +- ...schema_configured_with_message_mappings.cs | 2 +- ...configured_with_transport_discriminator.cs | 2 +- ...erviceBus.SqlServer.AcceptanceTests.csproj | 447 +++++++++--------- .../packages.config | 6 +- ...rviceBus.SqlServer.IntegrationTests.csproj | 4 +- .../packages.config | 4 +- .../IConfigureTransportInfrastructure.cs | 0 .../NServiceBusTransportTest.cs | 22 +- .../TransportConfigurationResult.cs | 0 .../TypeScanner.cs | 40 ++ .../When_failure_happens_after_send.cs | 0 .../When_message_is_available.cs | 0 .../When_on_error_throws.cs | 2 +- .../When_on_message_throws.cs | 0 ...n_on_message_throws_after_delayed_retry.cs | 0 ...on_message_throws_after_immediate_retry.cs | 0 .../When_requesting_immediate_retry.cs | 0 .../When_scope_dispose_throws.cs | 0 .../When_sending_from_on_error.cs | 0 .../When_user_aborts_processing.cs | 0 ...ServiceBus.SqlServer.TransportTests.csproj | 29 +- .../packages.config | 4 +- .../NServiceBus.SqlServer.UnitTests.csproj | 2 +- .../packages.config | 2 +- .../NServiceBus.SqlServer.csproj | 2 +- src/NServiceBus.SqlServer/packages.config | 2 +- 256 files changed, 1758 insertions(+), 587 deletions(-) delete mode 100644 src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/When_broadcasting_a_command.cs rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/ApiExtension/When_extending_sendoptions.cs (96%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/ApiExtension/When_extending_the_publish_api.cs (98%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Audit/When_a_message_is_audited.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Audit/When_a_replymessage_is_audited.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Audit/When_audit_is_overridden_in_code.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Audit/When_auditing.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Audit/When_auditing_message_with_TimeToBeReceived.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Basic/When_aborting_the_behavior_chain.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Basic/When_deferring_to_non_local.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Basic/When_depending_on_typed_feature.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Basic/When_depending_on_untyped_feature.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Basic/When_extending_behavior_context.cs (98%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Basic/When_handling_current_message_later.cs (94%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Basic/When_handling_message_with_several_messagehandlers.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Basic/When_multiple_mappings_exists.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Basic/When_no_content_type.cs (100%) create mode 100644 src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Basic/When_receiving_unobtrusive_message_without_handler.cs rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Basic/When_receiving_with_catch_all_handlers_registered.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Basic/When_registering_handlers_explicitly.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Basic/When_sending_from_a_send_only.cs (100%) create mode 100644 src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Basic/When_sending_interface_message_with_conventions.cs rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Basic/When_sending_to_another_endpoint.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Basic/When_sending_with_conventions.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Basic/When_using_a_greedy_convention.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/BestPractices/When_publishing_command.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/BestPractices/When_publishing_command_bestpractices_disabled.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/BestPractices/When_publishing_command_bestpractices_disabled_on_endpoint.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/BestPractices/When_sending_event.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/BestPractices/When_sending_events_bestpractices_disabled.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/BestPractices/When_sending_events_bestpractices_disabled_on_endpoint.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/BestPractices/When_subscribing_to_command.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/BestPractices/When_subscribing_to_command_bestpractices_disabled_on_endpoint.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/BestPractices/When_unsubscribing_to_command.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/BestPractices/When_unsubscribing_to_command_bestpractices_disabled_on_endpoint.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Causation/When_a_message_is_audited.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Causation/When_a_message_is_faulted.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Causation/When_a_message_is_sent.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Config/When_injecting_message_session_into_handlers.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Config/When_only_abstract_config_override_is_found.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Config/When_startup_is_complete.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/ConfigureEndpointInMemoryPersistence.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/ConfigureEndpointMsmqTransport.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/ConventionEnforcementTests.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Correlation/When_replying_to_received_message_without_correlationid.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Correlation/When_sending_with_no_correlation_id.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Correlation/When_using_a_custom_correlation_id.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/CriticalError/When_raising_critical_error.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/DataBus/When_sending_databus_properties.cs (100%) create mode 100644 src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/DataBus/When_sending_databus_properties_with_unobtrusive.cs rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/DataBus/When_using_custom_IDataBus.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/DelayedDelivery/TimeoutManager/When_TimeoutManager_is_disabled.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/DelayedDelivery/TimeoutManager/When_timeout_dispatch_fails.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/DelayedDelivery/TimeoutManager/When_timeout_dispatch_fails_on_timeout_data_removal.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/DelayedDelivery/TimeoutManager/When_timeout_storage_fails.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/DelayedDelivery/When_Deferring_a_message.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/DelayedDelivery/When_deferring_a_message_to_the_past.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/DeterministicGuid.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Encryption/When_using_Rijndael_with_config.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Encryption/When_using_Rijndael_with_custom.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Encryption/When_using_Rijndael_with_multikey.cs (100%) create mode 100644 src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Encryption/When_using_Rijndael_with_unobtrusive_mode.cs rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Encryption/When_using_Rijndael_without_incoming_key_identifier.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Encryption/When_using_encryption_with_custom_service.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/EndpointTemplates/ConfigureExtensions.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/EndpointTemplates/DefaultPublisher.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/EndpointTemplates/DefaultServer.cs (91%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/EndpointTemplates/EndpointCustomizationConfigurationExtensions.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/EndpointTemplates/ServerWithNoDefaultPersistenceDefinitions.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Forwarding/When_ForwardReceivedMessagesTo_is_set.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Hosting/When_a_message_is_audited.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Hosting/When_a_message_is_faulted.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Hosting/When_feature_overrides_hostid.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Hosting/When_feature_overrides_hostinfo.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006/Hosting/When_overriding_local_addresses.cs => NSB.AcceptanceTests.6.0.0-beta0007/Hosting/When_overriding_input_queue_name.cs} (81%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Hosting/When_sending_ensure_proper_headers.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Licensing/When_a_message_is_audited.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/MessageId/When_message_has_empty_id_header.cs (94%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/MessageId/When_message_has_no_id_header.cs (92%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Mutators/Issue_1980.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Mutators/When_defining_outgoing_message_mutators.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Mutators/When_incoming_mutator_changes_message_type.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Mutators/When_mutating.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Mutators/When_outgoing_mutator_replaces_instance.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Mutators/When_using_outgoing_tm_mutator.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/NServiceBusAcceptanceTest.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/NonTx/When_sending_inside_ambient_tx.cs (96%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/PerfMon/CriticalTime/When_CriticalTime_enabled.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/PerfMon/CriticalTime/When_deferring_a_message.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/PerfMon/CriticalTime/When_slow_with_CriticalTime_enabled.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/PerfMon/SLA/When_sending_slow_with_SLA_enabled.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/PerfMon/SLA/When_sending_with_SLA_enabled.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Performance/TimeToBeReceived/When_TimeToBeReceived_has_expired.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Performance/TimeToBeReceived/When_TimeToBeReceived_has_expired_convention.cs (97%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Performance/TimeToBeReceived/When_TimeToBeReceived_has_not_expired.cs (100%) create mode 100644 src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Performance/TimeToBeReceived/When_TimeToBeReceived_used_with_unobtrusive_mode.cs rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Performance/When_message_is_audited.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Performance/When_message_is_faulted.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Pipeline/When_replacing_behavior.cs (92%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Pipeline/When_using_per_uow_component_in_the_pipeline.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Recoverability/Retries/When_Subscribing_to_errors.cs (58%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Recoverability/Retries/When_custom_policy_always_moves_to_error.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Recoverability/Retries/When_custom_policy_does_single_delayed_retry_before_move_to_error.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Recoverability/Retries/When_custom_policy_executed.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Recoverability/Retries/When_custom_policy_provided.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/Retries/When_performing_slr_and_counting.cs => NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/Retries/When_delayed_retries_and_counting.cs} (72%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/Retries/When_performing_slr_with_flr_disabled.cs => NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/Retries/When_delayed_retries_with_immediate_retries_disabled.cs} (69%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/Retries/When_performing_slr_with_regular_exception.cs => NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/Retries/When_delayed_retries_with_regular_exception.cs} (82%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/Retries/When_performing_slr_with_serialization_exception.cs => NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/Retries/When_delayed_retries_with_serialization_exception.cs} (84%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Recoverability/Retries/When_fails_with_retries_set_to_0.cs (89%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/Retries/When_doing_flr_with_default_settings.cs => NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/Retries/When_immediate_retries_with_default_settings.cs} (96%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/Retries/When_doing_flr_with_dtc_on.cs => NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/Retries/When_immediate_retries_with_dtc_on.cs} (79%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/Retries/When_doing_flr_with_native_transactions.cs => NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/Retries/When_immediate_retries_with_native_transactions.cs} (80%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Recoverability/Retries/When_message_fails_retries.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/Retries/When_message_is_deferred_by_slr_using_dtc.cs => NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/Retries/When_message_is_deferred_by_delayed_retries_using_dtc.cs} (90%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/Retries/When_fails_flr.cs => NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/Retries/when_immediate_retries_fail.cs} (74%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Recoverability/When_custom_policy_moves_to_overridden_error_queue.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Recoverability/When_error_is_overridden_in_code.cs (88%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Recoverability/When_message_is_moved_to_error_queue.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Recoverability/When_message_is_moved_to_error_queue_using_dtc.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Recoverability/When_message_is_moved_to_error_queue_with_header_customizations.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Recoverability/When_message_with_TimeToBeReceived_fails.cs (93%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Reliability/Outbox/When_a_duplicate_message_arrives.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Reliability/Outbox/When_a_message_is_audited.cs (96%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Reliability/Outbox/When_blowing_up_just_after_dispatch.cs (96%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Reliability/Outbox/When_clearing_saga_timeouts.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Reliability/Outbox/When_dispatching_forwarded_messages.cs (98%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Reliability/Outbox/When_receiving_a_message.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Reliability/Outbox/When_sending_from_a_non_dtc_endpoint.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Routing/AutomaticSubscriptions/When_starting_an_endpoint_with_a_saga.cs (92%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Routing/AutomaticSubscriptions/When_starting_an_endpoint_with_a_saga_autosubscribe_disabled.cs (96%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Routing/AutomaticSubscriptions/When_starting_an_endpoint_with_autoSubscribe.cs (96%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Routing/SubscriptionBehavior.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Routing/SubscriptionBehaviorExtensions.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Routing/SubscriptionEventArgs.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Routing/When_base_event_from_2_publishers.cs (100%) create mode 100644 src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_configure_routes_for_unobtrusive_messages.cs rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Routing/When_handler_exists_but_routing_information_is_missing.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Routing/When_multi_subscribing_to_a_polymorphic_event_on_multicast_transports.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Routing/When_multi_subscribing_to_a_polymorphic_event_on_unicast_transports.cs (95%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Routing/When_publishing.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Routing/When_publishing_an_event_implementing_two_unrelated_interfaces.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Routing/When_publishing_an_interface.cs (96%) create mode 100644 src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_publishing_an_interface_with_unobtrusive.cs rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Routing/When_publishing_from_sendonly.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Routing/When_publishing_to_scaled_out_subscribers_on_multicast_transports.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Routing/When_publishing_to_scaled_out_subscribers_on_unicast_transports.cs (97%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Routing/When_publishing_using_root_type.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Routing/When_publishing_with_only_local_messagehandlers.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Routing/When_publishing_with_overridden_local_address.cs (100%) create mode 100644 src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_registering_publishers_unobtrusive_messages.cs rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Routing/When_replying_to_message.cs (96%) create mode 100644 src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_replying_to_message_with_interface.cs rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Routing/When_subscribing_to_a_polymorphic_event.cs (100%) create mode 100644 src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_subscribing_to_scaled_out_publisher_on_unicast_transport.cs rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Routing/When_using_assembly_level_message_mapping_for_pub_sub.cs (99%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Routing/When_using_instance_ids.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Routing/When_using_legacy_routing_configuration_combined_with_message_driven_pub_sub.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Routing/when_replying_to_a_message_sent_to_specific_instance.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/RunDescriptorExtensions.cs (100%) create mode 100644 src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_a_base_class_mapped_is_handled_by_a_saga.cs rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_a_base_class_message_hits_a_saga.cs => NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_a_base_class_message_starts_a_saga.cs} (71%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Sagas/When_a_existing_saga_instance_exists.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Sagas/When_a_finder_exists.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Sagas/When_a_finder_exists_and_context_information_added.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Sagas/When_a_finder_exists_and_found_saga.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Sagas/When_an_endpoint_replies_to_a_saga.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Sagas/When_auto_correlated_property_is_changed.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Sagas/When_doing_request_response_between_sagas.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Sagas/When_doing_request_response_between_sagas_first_handler_responding.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Sagas/When_doing_request_response_between_sagas_response_from_noninitiating.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Sagas/When_doing_request_response_between_sagas_with_timeout.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Sagas/When_forgetting_to_set_a_corr_property.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Sagas/When_message_has_a_saga_id.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Sagas/When_receiving_that_completes_the_saga.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Sagas/When_receiving_that_should_start_a_saga.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Sagas/When_receiving_that_should_start_a_saga_with_interception.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Sagas/When_receiving_that_should_start_a_saga_without_interception.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Sagas/When_replies_to_message_published_by_a_saga.cs (92%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Sagas/When_saga_handles_unmapped_message.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Sagas/When_saga_has_a_non_empty_constructor.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Sagas/When_saga_id_changed.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Sagas/When_saga_is_mapped_to_complex_expression.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_a_saga_message_goes_through_the_slr.cs => NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_saga_message_goes_through_delayed_retries.cs} (84%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Sagas/When_sagas_cant_be_found.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Sagas/When_sending_from_a_saga_handle.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Sagas/When_sending_from_a_saga_timeout.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Sagas/When_started_by_base_event_from_other_saga.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Sagas/When_started_by_event_from_another_saga.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Sagas/When_timeout_hit_not_found_saga.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Sagas/When_two_sagas_subscribe_to_the_same_event.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Sagas/When_updating_existing_correlation_property.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Sagas/When_using_ReplyToOriginator.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Sagas/When_using_a_received_message_for_timeout.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Sagas/When_using_contain_saga_data.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Sagas/when_receiving_multiple_timeouts.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Sagas/when_reply_from_saga_not_found_handler.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Satellites/When_a_message_is_available.cs (74%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/ScenarioDescriptors/AllOutboxCapableStorages.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/ScenarioDescriptors/AllTransports.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/ScenarioDescriptors/Builders.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/ScenarioDescriptors/EnvironmentHelper.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/ScenarioDescriptors/Persistence.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/ScenarioDescriptors/Serializers.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/ScenarioDescriptors/Transports.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Scheduling/When_scheduling_a_recurring_task.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/SelfVerification/When_running_saga_tests.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Serialization/When_configuring_custom_xml_namespace.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Serialization/When_registering_additional_deserializers.cs (74%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Serialization/When_registering_custom_serializer.cs (80%) create mode 100644 src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Serialization/When_registering_deserializers_with_settings.cs rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Serialization/When_sanitizing_xml_messages.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Serialization/When_skip_wrapping_xml.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Serialization/When_wrapping_is_not_skipped.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Timeout/CyclingOutageTimeoutPersister.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Timeout/When_timeout_storage_is_unavailable_temporarily.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Tx/FakePromotableResourceManager.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Tx/ImmediateDispatch/When_requesting_immediate_dispatch_using_scope_suppress.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Tx/ImmediateDispatch/When_requesting_immediate_dispatch_with_at_least_once.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Tx/ImmediateDispatch/When_requesting_immediate_dispatch_with_at_most_once.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Tx/ImmediateDispatch/When_requesting_immediate_dispatch_with_exactly_once.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Tx/Issue_2481.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Tx/When_receiving_with_dtc_enabled.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Tx/When_receiving_with_native_multi_queue_transaction.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Tx/When_receiving_with_the_default_settings.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Tx/When_sending_within_an_ambient_transaction.cs (100%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/UnicastPubSubExtensions.cs (72%) rename src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/{NSB.AcceptanceTests.6.0.0-beta0006 => NSB.AcceptanceTests.6.0.0-beta0007}/Versioning/When_multiple_versions_of_a_message_is_published.cs (100%) rename src/NServiceBus.SqlServer.TransportTests/App_Packages/{NSB.TransportTests.6.0.0-beta0006 => NSB.TransportTests.6.0.0-beta0007}/IConfigureTransportInfrastructure.cs (100%) rename src/NServiceBus.SqlServer.TransportTests/App_Packages/{NSB.TransportTests.6.0.0-beta0006 => NSB.TransportTests.6.0.0-beta0007}/NServiceBusTransportTest.cs (94%) rename src/NServiceBus.SqlServer.TransportTests/App_Packages/{NSB.TransportTests.6.0.0-beta0006 => NSB.TransportTests.6.0.0-beta0007}/TransportConfigurationResult.cs (100%) create mode 100644 src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0007/TypeScanner.cs rename src/NServiceBus.SqlServer.TransportTests/App_Packages/{NSB.TransportTests.6.0.0-beta0006 => NSB.TransportTests.6.0.0-beta0007}/When_failure_happens_after_send.cs (100%) rename src/NServiceBus.SqlServer.TransportTests/App_Packages/{NSB.TransportTests.6.0.0-beta0006 => NSB.TransportTests.6.0.0-beta0007}/When_message_is_available.cs (100%) rename src/NServiceBus.SqlServer.TransportTests/App_Packages/{NSB.TransportTests.6.0.0-beta0006 => NSB.TransportTests.6.0.0-beta0007}/When_on_error_throws.cs (92%) rename src/NServiceBus.SqlServer.TransportTests/App_Packages/{NSB.TransportTests.6.0.0-beta0006 => NSB.TransportTests.6.0.0-beta0007}/When_on_message_throws.cs (100%) rename src/NServiceBus.SqlServer.TransportTests/App_Packages/{NSB.TransportTests.6.0.0-beta0006 => NSB.TransportTests.6.0.0-beta0007}/When_on_message_throws_after_delayed_retry.cs (100%) rename src/NServiceBus.SqlServer.TransportTests/App_Packages/{NSB.TransportTests.6.0.0-beta0006 => NSB.TransportTests.6.0.0-beta0007}/When_on_message_throws_after_immediate_retry.cs (100%) rename src/NServiceBus.SqlServer.TransportTests/App_Packages/{NSB.TransportTests.6.0.0-beta0006 => NSB.TransportTests.6.0.0-beta0007}/When_requesting_immediate_retry.cs (100%) rename src/NServiceBus.SqlServer.TransportTests/App_Packages/{NSB.TransportTests.6.0.0-beta0006 => NSB.TransportTests.6.0.0-beta0007}/When_scope_dispose_throws.cs (100%) rename src/NServiceBus.SqlServer.TransportTests/App_Packages/{NSB.TransportTests.6.0.0-beta0006 => NSB.TransportTests.6.0.0-beta0007}/When_sending_from_on_error.cs (100%) rename src/NServiceBus.SqlServer.TransportTests/App_Packages/{NSB.TransportTests.6.0.0-beta0006 => NSB.TransportTests.6.0.0-beta0007}/When_user_aborts_processing.cs (100%) diff --git a/packaging/nuget/NServiceBus.SqlServer.nuspec b/packaging/nuget/NServiceBus.SqlServer.nuspec index d6442a94a..ca60cb8ca 100644 --- a/packaging/nuget/NServiceBus.SqlServer.nuspec +++ b/packaging/nuget/NServiceBus.SqlServer.nuspec @@ -15,7 +15,7 @@ $tags$ - + diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/When_broadcasting_a_command.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/When_broadcasting_a_command.cs deleted file mode 100644 index e1d953542..000000000 --- a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/When_broadcasting_a_command.cs +++ /dev/null @@ -1,103 +0,0 @@ -namespace NServiceBus.AcceptanceTests.Routing -{ - using System.Threading.Tasks; - using AcceptanceTesting; - using AcceptanceTesting.Customization; - using EndpointTemplates; - using Features; - using NServiceBus.Routing; - using NUnit.Framework; - - public class When_broadcasting_a_command : NServiceBusAcceptanceTest - { - static string ReceiverEndpoint => Conventions.EndpointNamingConvention(typeof(Receiver)); - - [Test] - public async Task Should_send_it_to_all_instances() - { - var context = await Scenario.Define() - .WithEndpoint(b => b.When(c => c.EndpointsStarted, (session, c) => session.Send(new Request()))) - .WithEndpoint(b => { b.CustomConfig(c => c.MakeInstanceUniquelyAddressable("1")); }) - .WithEndpoint(b => { b.CustomConfig(c => c.MakeInstanceUniquelyAddressable("2")); }) - .Done(c => c.Receiver1TimesCalled > 0 && c.Receiver2TimesCalled > 0) - .Run(); - - Assert.AreEqual(1, context.Receiver1TimesCalled); - Assert.AreEqual(1, context.Receiver2TimesCalled); - } - - public class Context : ScenarioContext - { - public int Receiver1TimesCalled { get; set; } - public int Receiver2TimesCalled { get; set; } - } - - public class Sender : EndpointConfigurationBuilder - { - public Sender() - { - EndpointSetup((c, r) => - { - c.UseTransport(r.GetTransportType()).Routing().RouteToEndpoint(typeof(Request), ReceiverEndpoint); - c.EnableFeature(); - }); - } - - class SpecificRoutingFeature : Feature - { - protected override void Setup(FeatureConfigurationContext context) - { - context.DistributionPolicy().SetDistributionStrategy(ReceiverEndpoint, new AllInstancesDistributionStrategy()); - context.EndpointInstances().Add( - new EndpointInstance(ReceiverEndpoint, "1"), - new EndpointInstance(ReceiverEndpoint, "2")); - } - } - - public class ResponseHandler : IHandleMessages - { - public Context Context { get; set; } - - public Task Handle(Response message, IMessageHandlerContext context) - { - var messageHeader = context.MessageHeaders[Headers.ReplyToAddress]; - if (messageHeader.Contains("Receiver") && messageHeader.Contains("1")) - { - Context.Receiver1TimesCalled++; - } - else if (messageHeader.Contains("Receiver") && messageHeader.Contains("2")) - { - Context.Receiver2TimesCalled++; - } - return Task.FromResult(0); - } - } - } - - public class Receiver : EndpointConfigurationBuilder - { - public Receiver() - { - EndpointSetup(); - } - - public class MyMessageHandler : IHandleMessages - { - public Task Handle(Request message, IMessageHandlerContext context) - { - var options = new ReplyOptions(); - options.RouteReplyToThisInstance(); - return context.Reply(new Response(), options); - } - } - } - - public class Request : ICommand - { - } - - public class Response : IMessage - { - } - } -} \ No newline at end of file diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/ApiExtension/When_extending_sendoptions.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/ApiExtension/When_extending_sendoptions.cs similarity index 96% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/ApiExtension/When_extending_sendoptions.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/ApiExtension/When_extending_sendoptions.cs index 581d38815..ec8c3e3fb 100644 --- a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/ApiExtension/When_extending_sendoptions.cs +++ b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/ApiExtension/When_extending_sendoptions.cs @@ -42,7 +42,7 @@ public class SendOptionsExtensions : EndpointConfigurationBuilder { public SendOptionsExtensions() { - EndpointSetup(c => c.Pipeline.Register("TestingSendOptionsExtension", typeof(TestingSendOptionsExtensionBehavior), "Testing send options extensions")); + EndpointSetup(c => c.Pipeline.Register("TestingSendOptionsExtension", new TestingSendOptionsExtensionBehavior(), "Testing send options extensions")); } class SendMessageHandler : IHandleMessages diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/ApiExtension/When_extending_the_publish_api.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/ApiExtension/When_extending_the_publish_api.cs similarity index 98% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/ApiExtension/When_extending_the_publish_api.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/ApiExtension/When_extending_the_publish_api.cs index a937952cc..65d872968 100644 --- a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/ApiExtension/When_extending_the_publish_api.cs +++ b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/ApiExtension/When_extending_the_publish_api.cs @@ -59,7 +59,7 @@ public Publisher() { b.OnEndpointSubscribed((s, context) => { context.Subscriber1Subscribed = true; }); - b.Pipeline.Register("PublishExtensionBehavior", typeof(PublishExtensionBehavior), "Testing publish extensions"); + b.Pipeline.Register("PublishExtensionBehavior", new PublishExtensionBehavior(), "Testing publish extensions"); }); } diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Audit/When_a_message_is_audited.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Audit/When_a_message_is_audited.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Audit/When_a_message_is_audited.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Audit/When_a_message_is_audited.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Audit/When_a_replymessage_is_audited.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Audit/When_a_replymessage_is_audited.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Audit/When_a_replymessage_is_audited.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Audit/When_a_replymessage_is_audited.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Audit/When_audit_is_overridden_in_code.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Audit/When_audit_is_overridden_in_code.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Audit/When_audit_is_overridden_in_code.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Audit/When_audit_is_overridden_in_code.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Audit/When_auditing.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Audit/When_auditing.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Audit/When_auditing.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Audit/When_auditing.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Audit/When_auditing_message_with_TimeToBeReceived.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Audit/When_auditing_message_with_TimeToBeReceived.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Audit/When_auditing_message_with_TimeToBeReceived.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Audit/When_auditing_message_with_TimeToBeReceived.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Basic/When_aborting_the_behavior_chain.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Basic/When_aborting_the_behavior_chain.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Basic/When_aborting_the_behavior_chain.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Basic/When_aborting_the_behavior_chain.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Basic/When_deferring_to_non_local.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Basic/When_deferring_to_non_local.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Basic/When_deferring_to_non_local.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Basic/When_deferring_to_non_local.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Basic/When_depending_on_typed_feature.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Basic/When_depending_on_typed_feature.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Basic/When_depending_on_typed_feature.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Basic/When_depending_on_typed_feature.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Basic/When_depending_on_untyped_feature.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Basic/When_depending_on_untyped_feature.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Basic/When_depending_on_untyped_feature.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Basic/When_depending_on_untyped_feature.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Basic/When_extending_behavior_context.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Basic/When_extending_behavior_context.cs similarity index 98% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Basic/When_extending_behavior_context.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Basic/When_extending_behavior_context.cs index 4d9057de3..a7a9e48da 100644 --- a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Basic/When_extending_behavior_context.cs +++ b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Basic/When_extending_behavior_context.cs @@ -38,7 +38,7 @@ public ContextExtendingEndpoint() { EndpointSetup(c => c.Pipeline.Register( "CustomContextExtensionBehavior", - typeof(CustomContextExtensionBehavior), + new CustomContextExtensionBehavior(), "Puts customized data on the message context")); } diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Basic/When_handling_current_message_later.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Basic/When_handling_current_message_later.cs similarity index 94% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Basic/When_handling_current_message_later.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Basic/When_handling_current_message_later.cs index 3cd4eff55..f0caf17b2 100644 --- a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Basic/When_handling_current_message_later.cs +++ b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Basic/When_handling_current_message_later.cs @@ -4,9 +4,6 @@ using System.Threading.Tasks; using AcceptanceTesting; using EndpointTemplates; - using Features; - using NServiceBus.Config; - using NServiceBus; using NUnit.Framework; using UnitOfWork; @@ -44,10 +41,8 @@ public MyEndpoint() EndpointSetup(b => { b.RegisterComponents(r => r.ConfigureComponent(DependencyLifecycle.InstancePerCall)); - b.DisableFeature(); b.ExecuteTheseHandlersFirst(typeof(FirstHandler), typeof(SecondHandler)); - }) - .WithConfig(c => { c.MaxRetries = 0; }); + }); } class CheckUnitOfWorkOutcome : IManageUnitsOfWork diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Basic/When_handling_message_with_several_messagehandlers.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Basic/When_handling_message_with_several_messagehandlers.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Basic/When_handling_message_with_several_messagehandlers.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Basic/When_handling_message_with_several_messagehandlers.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Basic/When_multiple_mappings_exists.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Basic/When_multiple_mappings_exists.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Basic/When_multiple_mappings_exists.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Basic/When_multiple_mappings_exists.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Basic/When_no_content_type.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Basic/When_no_content_type.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Basic/When_no_content_type.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Basic/When_no_content_type.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Basic/When_receiving_unobtrusive_message_without_handler.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Basic/When_receiving_unobtrusive_message_without_handler.cs new file mode 100644 index 000000000..2115788fe --- /dev/null +++ b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Basic/When_receiving_unobtrusive_message_without_handler.cs @@ -0,0 +1,65 @@ +namespace NServiceBus.AcceptanceTests.Basic +{ + using System.Linq; + using System.Threading.Tasks; + using AcceptanceTesting; + using EndpointTemplates; + using Logging; + using NUnit.Framework; + + public class When_receiving_unobtrusive_message_without_handler : NServiceBusAcceptanceTest + { + [Test] + public async Task Message_should_be_moved_to_error_cause_handler_not_found() + { + var context = await Scenario.Define() + .WithEndpoint(c => c.When(s => s.Send(new MyCommand()))) + .WithEndpoint(c => c.DoNotFailOnErrorMessages()) + .Done(c => c.FailedMessages.Any()) + .Run(); + + Assert.True(context.Logs.Any(l => l.Level == LogLevel.Error && l.Message.Contains($"No handlers could be found for message type: { typeof(MyCommand).FullName}")), "No handlers could be found was not logged."); + Assert.False(context.Logs.Any(l => l.Level == LogLevel.Warn && l.Message.Contains($"Message header '{ typeof(MyCommand).FullName }' was mapped to type '{ typeof(MyCommand).FullName }' but that type was not found in the message registry, ensure the same message registration conventions are used in all endpoints, especially if using unobtrusive mode.")), "Message type could not be mapped."); + Assert.False(context.Logs.Any(l => l.Level == LogLevel.Warn && l.Message.Contains($"Could not determine message type from message header '{ typeof(MyCommand).FullName}'")), "Message type could not be mapped."); + } + + public class Context : ScenarioContext + { + public bool WasCalled { get; set; } + } + + public class Sender : EndpointConfigurationBuilder + { + public Sender() + { + EndpointSetup(c => + { + c.Conventions() + .DefiningCommandsAs(t => t.Namespace != null && t.FullName == typeof(MyCommand).FullName); + + c.UseSerialization(); + }).AddMapping(typeof(Receiver)) + .ExcludeType(); // remove that type from assembly scanning to simulate what would happen with true unobtrusive mode + } + } + + + public class Receiver : EndpointConfigurationBuilder + { + public Receiver() + { + EndpointSetup(c => + { + c.Conventions().DefiningCommandsAs(t => t.Namespace != null && t.FullName == typeof(MyCommand).FullName); + + c.UseSerialization(); + }) + .ExcludeType(); // remove that type from assembly scanning to simulate what would happen with true unobtrusive mode + } + } + + public class MyCommand + { + } + } +} \ No newline at end of file diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Basic/When_receiving_with_catch_all_handlers_registered.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Basic/When_receiving_with_catch_all_handlers_registered.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Basic/When_receiving_with_catch_all_handlers_registered.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Basic/When_receiving_with_catch_all_handlers_registered.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Basic/When_registering_handlers_explicitly.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Basic/When_registering_handlers_explicitly.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Basic/When_registering_handlers_explicitly.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Basic/When_registering_handlers_explicitly.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Basic/When_sending_from_a_send_only.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Basic/When_sending_from_a_send_only.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Basic/When_sending_from_a_send_only.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Basic/When_sending_from_a_send_only.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Basic/When_sending_interface_message_with_conventions.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Basic/When_sending_interface_message_with_conventions.cs new file mode 100644 index 000000000..44714d0fe --- /dev/null +++ b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Basic/When_sending_interface_message_with_conventions.cs @@ -0,0 +1,76 @@ +namespace NServiceBus.AcceptanceTests.Basic +{ + using System; + using System.Threading.Tasks; + using AcceptanceTesting; + using EndpointTemplates; + using NUnit.Framework; + + public class When_sending_interface_message_with_conventions : NServiceBusAcceptanceTest + { + [Test] + public async Task Should_receive_the_message() + { + var context = await Scenario.Define(c => { c.Id = Guid.NewGuid(); }) + .WithEndpoint(b => b.When(async (session, c) => + { + await session.Send(m => m.Id = c.Id); + })) + .WithEndpoint() + .Done(c => c.MessageInterfaceReceived) + .Run(); + + Assert.True(context.MessageInterfaceReceived); + } + + public class Context : ScenarioContext + { + public bool MessageInterfaceReceived { get; set; } + public Guid Id { get; set; } + } + + public class Sender : EndpointConfigurationBuilder + { + public Sender() + { + EndpointSetup(b => b.Conventions().DefiningMessagesAs(type => type.Name.EndsWith("Message"))) + .AddMapping(typeof(Receiver)) + .ExcludeType(); // remove that type from assembly scanning to simulate what would happen with true unobtrusive mode + } + } + + public class Receiver : EndpointConfigurationBuilder + { + public Receiver() + { + EndpointSetup(builder => + { + builder.Conventions() + .DefiningMessagesAs(type => type.Name.EndsWith("Message")); + }); + } + + public class MyMessageInterfaceHandler : IHandleMessages + { + public Context Context { get; set; } + + public Task Handle(IMyInterfaceMessage interfaceMessage, IMessageHandlerContext context) + { + if (Context.Id != interfaceMessage.Id) + { + return Task.FromResult(0); + } + + Context.MessageInterfaceReceived = true; + + return Task.FromResult(0); + } + } + } + + public interface IMyInterfaceMessage + { + Guid Id { get; set; } + } + } +} \ No newline at end of file diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Basic/When_sending_to_another_endpoint.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Basic/When_sending_to_another_endpoint.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Basic/When_sending_to_another_endpoint.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Basic/When_sending_to_another_endpoint.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Basic/When_sending_with_conventions.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Basic/When_sending_with_conventions.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Basic/When_sending_with_conventions.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Basic/When_sending_with_conventions.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Basic/When_using_a_greedy_convention.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Basic/When_using_a_greedy_convention.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Basic/When_using_a_greedy_convention.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Basic/When_using_a_greedy_convention.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/BestPractices/When_publishing_command.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/BestPractices/When_publishing_command.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/BestPractices/When_publishing_command.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/BestPractices/When_publishing_command.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/BestPractices/When_publishing_command_bestpractices_disabled.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/BestPractices/When_publishing_command_bestpractices_disabled.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/BestPractices/When_publishing_command_bestpractices_disabled.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/BestPractices/When_publishing_command_bestpractices_disabled.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/BestPractices/When_publishing_command_bestpractices_disabled_on_endpoint.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/BestPractices/When_publishing_command_bestpractices_disabled_on_endpoint.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/BestPractices/When_publishing_command_bestpractices_disabled_on_endpoint.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/BestPractices/When_publishing_command_bestpractices_disabled_on_endpoint.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/BestPractices/When_sending_event.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/BestPractices/When_sending_event.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/BestPractices/When_sending_event.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/BestPractices/When_sending_event.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/BestPractices/When_sending_events_bestpractices_disabled.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/BestPractices/When_sending_events_bestpractices_disabled.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/BestPractices/When_sending_events_bestpractices_disabled.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/BestPractices/When_sending_events_bestpractices_disabled.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/BestPractices/When_sending_events_bestpractices_disabled_on_endpoint.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/BestPractices/When_sending_events_bestpractices_disabled_on_endpoint.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/BestPractices/When_sending_events_bestpractices_disabled_on_endpoint.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/BestPractices/When_sending_events_bestpractices_disabled_on_endpoint.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/BestPractices/When_subscribing_to_command.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/BestPractices/When_subscribing_to_command.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/BestPractices/When_subscribing_to_command.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/BestPractices/When_subscribing_to_command.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/BestPractices/When_subscribing_to_command_bestpractices_disabled_on_endpoint.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/BestPractices/When_subscribing_to_command_bestpractices_disabled_on_endpoint.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/BestPractices/When_subscribing_to_command_bestpractices_disabled_on_endpoint.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/BestPractices/When_subscribing_to_command_bestpractices_disabled_on_endpoint.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/BestPractices/When_unsubscribing_to_command.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/BestPractices/When_unsubscribing_to_command.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/BestPractices/When_unsubscribing_to_command.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/BestPractices/When_unsubscribing_to_command.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/BestPractices/When_unsubscribing_to_command_bestpractices_disabled_on_endpoint.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/BestPractices/When_unsubscribing_to_command_bestpractices_disabled_on_endpoint.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/BestPractices/When_unsubscribing_to_command_bestpractices_disabled_on_endpoint.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/BestPractices/When_unsubscribing_to_command_bestpractices_disabled_on_endpoint.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Causation/When_a_message_is_audited.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Causation/When_a_message_is_audited.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Causation/When_a_message_is_audited.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Causation/When_a_message_is_audited.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Causation/When_a_message_is_faulted.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Causation/When_a_message_is_faulted.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Causation/When_a_message_is_faulted.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Causation/When_a_message_is_faulted.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Causation/When_a_message_is_sent.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Causation/When_a_message_is_sent.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Causation/When_a_message_is_sent.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Causation/When_a_message_is_sent.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Config/When_injecting_message_session_into_handlers.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Config/When_injecting_message_session_into_handlers.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Config/When_injecting_message_session_into_handlers.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Config/When_injecting_message_session_into_handlers.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Config/When_only_abstract_config_override_is_found.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Config/When_only_abstract_config_override_is_found.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Config/When_only_abstract_config_override_is_found.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Config/When_only_abstract_config_override_is_found.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Config/When_startup_is_complete.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Config/When_startup_is_complete.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Config/When_startup_is_complete.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Config/When_startup_is_complete.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/ConfigureEndpointInMemoryPersistence.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/ConfigureEndpointInMemoryPersistence.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/ConfigureEndpointInMemoryPersistence.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/ConfigureEndpointInMemoryPersistence.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/ConfigureEndpointMsmqTransport.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/ConfigureEndpointMsmqTransport.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/ConfigureEndpointMsmqTransport.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/ConfigureEndpointMsmqTransport.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/ConventionEnforcementTests.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/ConventionEnforcementTests.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/ConventionEnforcementTests.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/ConventionEnforcementTests.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Correlation/When_replying_to_received_message_without_correlationid.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Correlation/When_replying_to_received_message_without_correlationid.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Correlation/When_replying_to_received_message_without_correlationid.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Correlation/When_replying_to_received_message_without_correlationid.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Correlation/When_sending_with_no_correlation_id.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Correlation/When_sending_with_no_correlation_id.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Correlation/When_sending_with_no_correlation_id.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Correlation/When_sending_with_no_correlation_id.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Correlation/When_using_a_custom_correlation_id.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Correlation/When_using_a_custom_correlation_id.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Correlation/When_using_a_custom_correlation_id.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Correlation/When_using_a_custom_correlation_id.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/CriticalError/When_raising_critical_error.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/CriticalError/When_raising_critical_error.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/CriticalError/When_raising_critical_error.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/CriticalError/When_raising_critical_error.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/DataBus/When_sending_databus_properties.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/DataBus/When_sending_databus_properties.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/DataBus/When_sending_databus_properties.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/DataBus/When_sending_databus_properties.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/DataBus/When_sending_databus_properties_with_unobtrusive.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/DataBus/When_sending_databus_properties_with_unobtrusive.cs new file mode 100644 index 000000000..706e01e88 --- /dev/null +++ b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/DataBus/When_sending_databus_properties_with_unobtrusive.cs @@ -0,0 +1,84 @@ +namespace NServiceBus.AcceptanceTests.DataBus +{ + using System.Threading.Tasks; + using AcceptanceTesting; + using EndpointTemplates; + using NUnit.Framework; + + public class When_sending_databus_properties_with_unobtrusive : NServiceBusAcceptanceTest + { + [Test] + public async Task Should_receive_messages_with_largepayload_correctly() + { + var payloadToSend = new byte[PayloadSize]; + + var context = await Scenario.Define() + .WithEndpoint(b => b.When(session => session.Send(new MyMessageWithLargePayload + { + Payload = payloadToSend + }))) + .WithEndpoint() + .Done(c => c.ReceivedPayload != null) + .Run(); + + Assert.AreEqual(payloadToSend, context.ReceivedPayload, "The large payload should be marshalled correctly using the databus"); + } + + const int PayloadSize = 100; + + public class Context : ScenarioContext + { + public byte[] ReceivedPayload { get; set; } + } + + public class Sender : EndpointConfigurationBuilder + { + public Sender() + { + EndpointSetup(builder => + { + builder.Conventions() + .DefiningCommandsAs(t => t.Namespace != null && t.FullName == typeof(MyMessageWithLargePayload).FullName) + .DefiningDataBusPropertiesAs(t => t.Name.Contains("Payload")); + builder.UseDataBus().BasePath(@".\databus\sender"); + builder.UseSerialization(); + }) + .AddMapping(typeof(Receiver)) + .ExcludeType(); // remove that type from assembly scanning to simulate what would happen with true unobtrusive mode + } + } + + public class Receiver : EndpointConfigurationBuilder + { + public Receiver() + { + EndpointSetup(builder => + { + builder.Conventions() + .DefiningCommandsAs(t => t.Namespace != null && t.FullName == typeof(MyMessageWithLargePayload).FullName) + .DefiningDataBusPropertiesAs(t => t.Name.Contains("Payload")); + + builder.UseDataBus().BasePath(@".\databus\sender"); + builder.UseSerialization(); + }); + } + + public class MyMessageHandler : IHandleMessages + { + public Context Context { get; set; } + + public Task Handle(MyMessageWithLargePayload messageWithLargePayload, IMessageHandlerContext context) + { + Context.ReceivedPayload = messageWithLargePayload.Payload; + + return Task.FromResult(0); + } + } + } + + public class MyMessageWithLargePayload + { + public byte[] Payload { get; set; } + } + } +} \ No newline at end of file diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/DataBus/When_using_custom_IDataBus.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/DataBus/When_using_custom_IDataBus.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/DataBus/When_using_custom_IDataBus.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/DataBus/When_using_custom_IDataBus.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/DelayedDelivery/TimeoutManager/When_TimeoutManager_is_disabled.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/DelayedDelivery/TimeoutManager/When_TimeoutManager_is_disabled.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/DelayedDelivery/TimeoutManager/When_TimeoutManager_is_disabled.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/DelayedDelivery/TimeoutManager/When_TimeoutManager_is_disabled.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/DelayedDelivery/TimeoutManager/When_timeout_dispatch_fails.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/DelayedDelivery/TimeoutManager/When_timeout_dispatch_fails.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/DelayedDelivery/TimeoutManager/When_timeout_dispatch_fails.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/DelayedDelivery/TimeoutManager/When_timeout_dispatch_fails.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/DelayedDelivery/TimeoutManager/When_timeout_dispatch_fails_on_timeout_data_removal.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/DelayedDelivery/TimeoutManager/When_timeout_dispatch_fails_on_timeout_data_removal.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/DelayedDelivery/TimeoutManager/When_timeout_dispatch_fails_on_timeout_data_removal.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/DelayedDelivery/TimeoutManager/When_timeout_dispatch_fails_on_timeout_data_removal.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/DelayedDelivery/TimeoutManager/When_timeout_storage_fails.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/DelayedDelivery/TimeoutManager/When_timeout_storage_fails.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/DelayedDelivery/TimeoutManager/When_timeout_storage_fails.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/DelayedDelivery/TimeoutManager/When_timeout_storage_fails.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/DelayedDelivery/When_Deferring_a_message.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/DelayedDelivery/When_Deferring_a_message.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/DelayedDelivery/When_Deferring_a_message.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/DelayedDelivery/When_Deferring_a_message.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/DelayedDelivery/When_deferring_a_message_to_the_past.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/DelayedDelivery/When_deferring_a_message_to_the_past.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/DelayedDelivery/When_deferring_a_message_to_the_past.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/DelayedDelivery/When_deferring_a_message_to_the_past.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/DeterministicGuid.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/DeterministicGuid.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/DeterministicGuid.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/DeterministicGuid.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Encryption/When_using_Rijndael_with_config.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Encryption/When_using_Rijndael_with_config.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Encryption/When_using_Rijndael_with_config.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Encryption/When_using_Rijndael_with_config.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Encryption/When_using_Rijndael_with_custom.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Encryption/When_using_Rijndael_with_custom.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Encryption/When_using_Rijndael_with_custom.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Encryption/When_using_Rijndael_with_custom.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Encryption/When_using_Rijndael_with_multikey.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Encryption/When_using_Rijndael_with_multikey.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Encryption/When_using_Rijndael_with_multikey.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Encryption/When_using_Rijndael_with_multikey.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Encryption/When_using_Rijndael_with_unobtrusive_mode.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Encryption/When_using_Rijndael_with_unobtrusive_mode.cs new file mode 100644 index 000000000..022481ecf --- /dev/null +++ b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Encryption/When_using_Rijndael_with_unobtrusive_mode.cs @@ -0,0 +1,139 @@ +namespace NServiceBus.AcceptanceTests.Encryption +{ + using System; + using System.Collections.Generic; + using System.Linq; + using System.Text; + using System.Threading.Tasks; + using AcceptanceTesting; + using EndpointTemplates; + using NUnit.Framework; + + public class When_using_Rijndael_with_unobtrusive_mode : NServiceBusAcceptanceTest + { + [Test] + public async Task Should_receive_decrypted_message() + { + var context = await Scenario.Define() + .WithEndpoint(b => b.When(session => session.Send(new MessageWithSecretData + { + EncryptedSecret = "betcha can't guess my secret", + SubProperty = new MySecretSubProperty + { + EncryptedSecret = "My sub secret" + }, + CreditCards = new List + { + new CreditCardDetails + { + ValidTo = DateTime.UtcNow.AddYears(1), + EncryptedNumber = "312312312312312" + }, + new CreditCardDetails + { + ValidTo = DateTime.UtcNow.AddYears(2), + EncryptedNumber = "543645546546456" + } + } + }))) + .WithEndpoint() + .Done(c => c.GetTheMessage || c.FailedMessages.Any()) + .Run(); + + Assert.AreEqual("betcha can't guess my secret", context.Secret); + Assert.AreEqual("My sub secret", context.SubPropertySecret); + CollectionAssert.AreEquivalent(new List + { + "312312312312312", + "543645546546456" + }, context.CreditCards); + } + + static Dictionary Keys = new Dictionary + { + {"1st", Encoding.ASCII.GetBytes("gdDbqRpqdRbTs3mhdZh9qCaDaxJXl+e6")} + }; + + public class Context : ScenarioContext + { + public bool GetTheMessage { get; set; } + + public string Secret { get; set; } + + public string SubPropertySecret { get; set; } + + public List CreditCards { get; set; } + } + + public class Sender : EndpointConfigurationBuilder + { + public Sender() + { + EndpointSetup(c => + { + c.Conventions() + .DefiningCommandsAs(t => t.Namespace != null && t.FullName == typeof(MessageWithSecretData).FullName) + .DefiningEncryptedPropertiesAs(t => t.Name.StartsWith("Encrypted")); + + c.RijndaelEncryptionService("1st", Keys); + }).AddMapping(typeof(Receiver)) + .ExcludeType(); // remove that type from assembly scanning to simulate what would happen with true unobtrusive mode + } + } + + public class Receiver : EndpointConfigurationBuilder + { + public Receiver() + { + EndpointSetup(c => + { + c.Conventions() + .DefiningCommandsAs(t => t.Namespace != null && t.FullName == typeof(MessageWithSecretData).FullName) + .DefiningEncryptedPropertiesAs(t => t.Name.StartsWith("Encrypted")); + + c.RijndaelEncryptionService("1st", Keys); + }); + } + + public class Handler : IHandleMessages + { + public Context Context { get; set; } + + public Task Handle(MessageWithSecretData message, IMessageHandlerContext context) + { + Context.Secret = message.EncryptedSecret; + + Context.SubPropertySecret = message.SubProperty.EncryptedSecret; + + Context.CreditCards = new List + { + message.CreditCards[0].EncryptedNumber, + message.CreditCards[1].EncryptedNumber + }; + + Context.GetTheMessage = true; + + return Task.FromResult(0); + } + } + } + + public class MessageWithSecretData + { + public string EncryptedSecret { get; set; } + public MySecretSubProperty SubProperty { get; set; } + public List CreditCards { get; set; } + } + + public class CreditCardDetails + { + public DateTime ValidTo { get; set; } + public string EncryptedNumber { get; set; } + } + + public class MySecretSubProperty + { + public string EncryptedSecret { get; set; } + } + } +} \ No newline at end of file diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Encryption/When_using_Rijndael_without_incoming_key_identifier.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Encryption/When_using_Rijndael_without_incoming_key_identifier.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Encryption/When_using_Rijndael_without_incoming_key_identifier.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Encryption/When_using_Rijndael_without_incoming_key_identifier.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Encryption/When_using_encryption_with_custom_service.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Encryption/When_using_encryption_with_custom_service.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Encryption/When_using_encryption_with_custom_service.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Encryption/When_using_encryption_with_custom_service.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/EndpointTemplates/ConfigureExtensions.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/EndpointTemplates/ConfigureExtensions.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/EndpointTemplates/ConfigureExtensions.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/EndpointTemplates/ConfigureExtensions.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/EndpointTemplates/DefaultPublisher.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/EndpointTemplates/DefaultPublisher.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/EndpointTemplates/DefaultPublisher.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/EndpointTemplates/DefaultPublisher.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/EndpointTemplates/DefaultServer.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/EndpointTemplates/DefaultServer.cs similarity index 91% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/EndpointTemplates/DefaultServer.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/EndpointTemplates/DefaultServer.cs index 098d0bec4..83c7c7c5e 100644 --- a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/EndpointTemplates/DefaultServer.cs +++ b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/EndpointTemplates/DefaultServer.cs @@ -37,9 +37,10 @@ public async Task GetConfiguration(RunDescriptor runDescr configuration.EnableInstallers(); configuration.DisableFeature(); - configuration.Recoverability() - .Delayed(delayed => delayed.NumberOfRetries(0)) - .Immediate(immediate => immediate.NumberOfRetries(0)); + + var recoverability = configuration.Recoverability(); + recoverability.Delayed(delayed => delayed.NumberOfRetries(0)); + recoverability.Immediate(immediate => immediate.NumberOfRetries(0)); await configuration.DefineTransport(settings, endpointConfiguration.EndpointName).ConfigureAwait(false); diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/EndpointTemplates/EndpointCustomizationConfigurationExtensions.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/EndpointTemplates/EndpointCustomizationConfigurationExtensions.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/EndpointTemplates/EndpointCustomizationConfigurationExtensions.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/EndpointTemplates/EndpointCustomizationConfigurationExtensions.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/EndpointTemplates/ServerWithNoDefaultPersistenceDefinitions.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/EndpointTemplates/ServerWithNoDefaultPersistenceDefinitions.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/EndpointTemplates/ServerWithNoDefaultPersistenceDefinitions.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/EndpointTemplates/ServerWithNoDefaultPersistenceDefinitions.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Forwarding/When_ForwardReceivedMessagesTo_is_set.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Forwarding/When_ForwardReceivedMessagesTo_is_set.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Forwarding/When_ForwardReceivedMessagesTo_is_set.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Forwarding/When_ForwardReceivedMessagesTo_is_set.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Hosting/When_a_message_is_audited.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Hosting/When_a_message_is_audited.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Hosting/When_a_message_is_audited.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Hosting/When_a_message_is_audited.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Hosting/When_a_message_is_faulted.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Hosting/When_a_message_is_faulted.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Hosting/When_a_message_is_faulted.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Hosting/When_a_message_is_faulted.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Hosting/When_feature_overrides_hostid.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Hosting/When_feature_overrides_hostid.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Hosting/When_feature_overrides_hostid.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Hosting/When_feature_overrides_hostid.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Hosting/When_feature_overrides_hostinfo.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Hosting/When_feature_overrides_hostinfo.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Hosting/When_feature_overrides_hostinfo.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Hosting/When_feature_overrides_hostinfo.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Hosting/When_overriding_local_addresses.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Hosting/When_overriding_input_queue_name.cs similarity index 81% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Hosting/When_overriding_local_addresses.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Hosting/When_overriding_input_queue_name.cs index 9b57e446b..ce32c587d 100644 --- a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Hosting/When_overriding_local_addresses.cs +++ b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Hosting/When_overriding_input_queue_name.cs @@ -6,7 +6,7 @@ namespace NServiceBus.AcceptanceTests.Hosting using Features; using NUnit.Framework; - public class When_overriding_local_addresses : NServiceBusAcceptanceTest + public class When_overriding_input_queue_name : NServiceBusAcceptanceTest { [Test] public async Task Should_use_custom_queue_names() @@ -17,7 +17,7 @@ public async Task Should_use_custom_queue_names() .Run(); Assert.IsTrue(context.Done); - Assert.IsTrue(context.InputQueue.StartsWith("OverriddenLocalAddress")); + Assert.IsTrue(context.InputQueue.StartsWith("OverriddenInputQueue")); } public class MyEndpoint : EndpointConfigurationBuilder @@ -26,10 +26,8 @@ public MyEndpoint() { EndpointSetup((c, d) => { + c.OverrideLocalAddress("OverriddenInputQueue"); c.EnableFeature(); - c.UseTransport(d.GetTransportType()) - .Transactions(TransportTransactionMode.None) - .AddAddressTranslationRule(address => "OverriddenLocalAddress" + address.Qualifier); //Overriding -> Overridden }); } } diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Hosting/When_sending_ensure_proper_headers.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Hosting/When_sending_ensure_proper_headers.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Hosting/When_sending_ensure_proper_headers.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Hosting/When_sending_ensure_proper_headers.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Licensing/When_a_message_is_audited.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Licensing/When_a_message_is_audited.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Licensing/When_a_message_is_audited.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Licensing/When_a_message_is_audited.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/MessageId/When_message_has_empty_id_header.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/MessageId/When_message_has_empty_id_header.cs similarity index 94% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/MessageId/When_message_has_empty_id_header.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/MessageId/When_message_has_empty_id_header.cs index 2fa09993c..7bc3a3e81 100644 --- a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/MessageId/When_message_has_empty_id_header.cs +++ b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/MessageId/When_message_has_empty_id_header.cs @@ -25,8 +25,6 @@ public async Task A_message_id_is_generated_by_the_transport_layer() public class CorruptionBehavior : Behavior { - public Context Context { get; set; } - public override Task Invoke(IDispatchContext context, Func next) { context.Operations.First().Message.Headers[Headers.MessageId] = ""; @@ -46,7 +44,7 @@ public class Endpoint : EndpointConfigurationBuilder { public Endpoint() { - EndpointSetup(c => c.Pipeline.Register("CorruptionBehavior", typeof(CorruptionBehavior), "Corrupting the message id")); + EndpointSetup(c => c.Pipeline.Register("CorruptionBehavior", new CorruptionBehavior(), "Corrupting the message id")); } class Handler : IHandleMessages diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/MessageId/When_message_has_no_id_header.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/MessageId/When_message_has_no_id_header.cs similarity index 92% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/MessageId/When_message_has_no_id_header.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/MessageId/When_message_has_no_id_header.cs index 140e34403..bbdffa0cc 100644 --- a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/MessageId/When_message_has_no_id_header.cs +++ b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/MessageId/When_message_has_no_id_header.cs @@ -23,8 +23,6 @@ public async Task A_message_id_is_generated_by_the_transport_layer_on_receiving_ public class CorruptionBehavior : Behavior { - public Context Context { get; set; } - public override Task Invoke(IDispatchContext context, Func next) { context.Operations.First().Message.Headers[Headers.MessageId] = null; @@ -43,7 +41,7 @@ public class Endpoint : EndpointConfigurationBuilder { public Endpoint() { - EndpointSetup(c => c.Pipeline.Register("CorruptionBehavior", typeof(When_message_has_empty_id_header.CorruptionBehavior), "Corrupting the message id")); + EndpointSetup(c => c.Pipeline.Register("CorruptionBehavior", new CorruptionBehavior(), "Corrupting the message id")); } class Handler : IHandleMessages diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Mutators/Issue_1980.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Mutators/Issue_1980.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Mutators/Issue_1980.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Mutators/Issue_1980.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Mutators/When_defining_outgoing_message_mutators.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Mutators/When_defining_outgoing_message_mutators.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Mutators/When_defining_outgoing_message_mutators.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Mutators/When_defining_outgoing_message_mutators.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Mutators/When_incoming_mutator_changes_message_type.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Mutators/When_incoming_mutator_changes_message_type.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Mutators/When_incoming_mutator_changes_message_type.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Mutators/When_incoming_mutator_changes_message_type.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Mutators/When_mutating.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Mutators/When_mutating.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Mutators/When_mutating.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Mutators/When_mutating.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Mutators/When_outgoing_mutator_replaces_instance.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Mutators/When_outgoing_mutator_replaces_instance.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Mutators/When_outgoing_mutator_replaces_instance.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Mutators/When_outgoing_mutator_replaces_instance.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Mutators/When_using_outgoing_tm_mutator.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Mutators/When_using_outgoing_tm_mutator.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Mutators/When_using_outgoing_tm_mutator.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Mutators/When_using_outgoing_tm_mutator.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/NServiceBusAcceptanceTest.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/NServiceBusAcceptanceTest.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/NServiceBusAcceptanceTest.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/NServiceBusAcceptanceTest.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/NonTx/When_sending_inside_ambient_tx.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/NonTx/When_sending_inside_ambient_tx.cs similarity index 96% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/NonTx/When_sending_inside_ambient_tx.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/NonTx/When_sending_inside_ambient_tx.cs index faeb9117c..9e4436d4d 100644 --- a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/NonTx/When_sending_inside_ambient_tx.cs +++ b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/NonTx/When_sending_inside_ambient_tx.cs @@ -38,7 +38,7 @@ public NonTransactionalEndpoint() EndpointSetup((config, context) => { config.UseTransport(context.GetTransportType()).Transactions(TransportTransactionMode.None); - config.Pipeline.Register("WrapInScope", typeof(WrapHandlersInScope), "Wraps the handlers in a scope"); + config.Pipeline.Register("WrapInScope", new WrapHandlersInScope(), "Wraps the handlers in a scope"); }); } diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/PerfMon/CriticalTime/When_CriticalTime_enabled.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/PerfMon/CriticalTime/When_CriticalTime_enabled.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/PerfMon/CriticalTime/When_CriticalTime_enabled.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/PerfMon/CriticalTime/When_CriticalTime_enabled.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/PerfMon/CriticalTime/When_deferring_a_message.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/PerfMon/CriticalTime/When_deferring_a_message.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/PerfMon/CriticalTime/When_deferring_a_message.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/PerfMon/CriticalTime/When_deferring_a_message.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/PerfMon/CriticalTime/When_slow_with_CriticalTime_enabled.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/PerfMon/CriticalTime/When_slow_with_CriticalTime_enabled.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/PerfMon/CriticalTime/When_slow_with_CriticalTime_enabled.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/PerfMon/CriticalTime/When_slow_with_CriticalTime_enabled.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/PerfMon/SLA/When_sending_slow_with_SLA_enabled.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/PerfMon/SLA/When_sending_slow_with_SLA_enabled.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/PerfMon/SLA/When_sending_slow_with_SLA_enabled.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/PerfMon/SLA/When_sending_slow_with_SLA_enabled.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/PerfMon/SLA/When_sending_with_SLA_enabled.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/PerfMon/SLA/When_sending_with_SLA_enabled.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/PerfMon/SLA/When_sending_with_SLA_enabled.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/PerfMon/SLA/When_sending_with_SLA_enabled.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Performance/TimeToBeReceived/When_TimeToBeReceived_has_expired.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Performance/TimeToBeReceived/When_TimeToBeReceived_has_expired.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Performance/TimeToBeReceived/When_TimeToBeReceived_has_expired.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Performance/TimeToBeReceived/When_TimeToBeReceived_has_expired.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Performance/TimeToBeReceived/When_TimeToBeReceived_has_expired_convention.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Performance/TimeToBeReceived/When_TimeToBeReceived_has_expired_convention.cs similarity index 97% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Performance/TimeToBeReceived/When_TimeToBeReceived_has_expired_convention.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Performance/TimeToBeReceived/When_TimeToBeReceived_has_expired_convention.cs index 6fd21a39c..13e4c2f54 100644 --- a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Performance/TimeToBeReceived/When_TimeToBeReceived_has_expired_convention.cs +++ b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Performance/TimeToBeReceived/When_TimeToBeReceived_has_expired_convention.cs @@ -57,7 +57,7 @@ public Endpoint() { if (messageType == typeof(MyMessage)) { - return TimeSpan.Parse("00:00:02"); + return TimeSpan.FromSeconds(2); } return TimeSpan.MaxValue; }); diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Performance/TimeToBeReceived/When_TimeToBeReceived_has_not_expired.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Performance/TimeToBeReceived/When_TimeToBeReceived_has_not_expired.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Performance/TimeToBeReceived/When_TimeToBeReceived_has_not_expired.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Performance/TimeToBeReceived/When_TimeToBeReceived_has_not_expired.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Performance/TimeToBeReceived/When_TimeToBeReceived_used_with_unobtrusive_mode.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Performance/TimeToBeReceived/When_TimeToBeReceived_used_with_unobtrusive_mode.cs new file mode 100644 index 000000000..eeb3286bc --- /dev/null +++ b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Performance/TimeToBeReceived/When_TimeToBeReceived_used_with_unobtrusive_mode.cs @@ -0,0 +1,119 @@ +namespace NServiceBus.AcceptanceTests.Performance.TimeToBeReceived +{ + using System; + using System.Threading.Tasks; + using AcceptanceTesting; + using EndpointTemplates; + using Features; + using NUnit.Framework; + + public class When_TimeToBeReceived_used_with_unobtrusive_mode : NServiceBusAcceptanceTest + { + [Test] + public async Task Message_should_not_be_received() + { + var context = await Scenario.Define() + .WithEndpoint() + .WithEndpoint() + .Run(TimeSpan.FromSeconds(10)); + + Assert.IsFalse(context.WasCalled); + } + + public class Context : ScenarioContext + { + public bool WasCalled { get; set; } + } + + class SendMessageWhileStarting : Feature + { + protected override void Setup(FeatureConfigurationContext context) + { + context.RegisterStartupTask(b => new SendMessageWhileStartingTask()); + } + } + + class SendMessageWhileStartingTask : FeatureStartupTask + { + protected override Task OnStart(IMessageSession session) + { + return session.Send(new MyCommand()); + } + + protected override Task OnStop(IMessageSession session) + { + return Task.FromResult(0); + } + } + + public class Sender : EndpointConfigurationBuilder + { + public Sender() + { + EndpointSetup(c => + { + c.Conventions() + .DefiningCommandsAs(t => t.Namespace != null && t.FullName == typeof(MyCommand).FullName) + .DefiningTimeToBeReceivedAs(messageType => + { + if (messageType == typeof(MyCommand)) + { + return TimeSpan.FromSeconds(2); + } + return TimeSpan.MaxValue; + }); + c.EnableFeature(); + }).AddMapping(typeof(Receiver)) + .ExcludeType(); // remove that type from assembly scanning to simulate what would happen with true unobtrusive mode + } + } + + class DelayReceiverFromStarting : Feature + { + protected override void Setup(FeatureConfigurationContext context) + { + context.RegisterStartupTask(b => new DelayReceiverFromStartingTask()); + } + } + + class DelayReceiverFromStartingTask : FeatureStartupTask + { + protected override Task OnStart(IMessageSession session) + { + return Task.Delay(TimeSpan.FromSeconds(5)); + } + + protected override Task OnStop(IMessageSession session) + { + return Task.FromResult(0); + } + } + + public class Receiver : EndpointConfigurationBuilder + { + public Receiver() + { + EndpointSetup(c => + { + c.Conventions().DefiningCommandsAs(t => t.Namespace != null && t.FullName == typeof(MyCommand).FullName); + c.EnableFeature(); + }); + } + + public class MyMessageHandler : IHandleMessages + { + public Context Context { get; set; } + + public Task Handle(MyCommand message, IMessageHandlerContext context) + { + Context.WasCalled = true; + return Task.FromResult(0); + } + } + } + + public class MyCommand + { + } + } +} \ No newline at end of file diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Performance/When_message_is_audited.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Performance/When_message_is_audited.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Performance/When_message_is_audited.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Performance/When_message_is_audited.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Performance/When_message_is_faulted.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Performance/When_message_is_faulted.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Performance/When_message_is_faulted.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Performance/When_message_is_faulted.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Pipeline/When_replacing_behavior.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Pipeline/When_replacing_behavior.cs similarity index 92% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Pipeline/When_replacing_behavior.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Pipeline/When_replacing_behavior.cs index 2345f05f5..dde327ace 100644 --- a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Pipeline/When_replacing_behavior.cs +++ b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Pipeline/When_replacing_behavior.cs @@ -69,8 +69,8 @@ public EndpointWithReplacement() EndpointSetup(c => { // replace before register to ensure out-of-order replacements work correctly. - c.Pipeline.Replace("demoBehavior", typeof(ReplacementBehavior)); - c.Pipeline.Register("demoBehavior", typeof(OriginalBehavior), "test behavior replacement"); + c.Pipeline.Replace("demoBehavior", new ReplacementBehavior((Context)ScenarioContext)); + c.Pipeline.Register("demoBehavior", new OriginalBehavior((Context)ScenarioContext), "test behavior replacement"); }); } diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Pipeline/When_using_per_uow_component_in_the_pipeline.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Pipeline/When_using_per_uow_component_in_the_pipeline.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Pipeline/When_using_per_uow_component_in_the_pipeline.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Pipeline/When_using_per_uow_component_in_the_pipeline.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/Retries/When_Subscribing_to_errors.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/Retries/When_Subscribing_to_errors.cs similarity index 58% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/Retries/When_Subscribing_to_errors.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/Retries/When_Subscribing_to_errors.cs index fadbc6c68..76839723d 100644 --- a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/Retries/When_Subscribing_to_errors.cs +++ b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/Retries/When_Subscribing_to_errors.cs @@ -7,16 +7,15 @@ using EndpointTemplates; using Features; using Logging; - using NServiceBus.Config; using NUnit.Framework; public class When_Subscribing_to_errors : NServiceBusAcceptanceTest { [Test] - public async Task Should_retain_exception_details_over_FLR_and_SLR() + public async Task Should_retain_exception_details_over_immediate_and_delayed_retries() { var context = await Scenario.Define(c => { c.Id = Guid.NewGuid(); }) - .WithEndpoint(b => + .WithEndpoint(b => { b.DoNotFailOnErrorMessages(); b.When((session, c) => session.SendLocal(new MessageToBeRetried @@ -30,46 +29,51 @@ public async Task Should_retain_exception_details_over_FLR_and_SLR() Assert.IsInstanceOf(context.MessageSentToErrorException); Assert.True(context.Logs.Any(l => l.Level == LogLevel.Error && l.Message.Contains("Simulated exception message")), "The last exception should be logged as `error` before sending it to the error queue"); - //FLR max retries = 3 means we will be processing 4 times. SLR max retries = 2 means we will do 3*FLR - Assert.AreEqual(4*3, context.TotalNumberOfFLRTimesInvokedInHandler); - Assert.AreEqual(3*3, context.TotalNumberOfFLREventInvocations); - Assert.AreEqual(2, context.NumberOfSLRRetriesPerformed); + // Immediate Retries max retries = 3 means we will be processing 4 times. Delayed Retries max retries = 2 means we will do 3*Immediate Retries + Assert.AreEqual(4*3, context.TotalNumberOfImmediateRetriesTimesInvokedInHandler); + Assert.AreEqual(3*3, context.TotalNumberOfImmediateRetriesEventInvocations); + Assert.AreEqual(2, context.NumberOfDelayedRetriesPerformed); } class Context : ScenarioContext { public Guid Id { get; set; } - public int TotalNumberOfFLREventInvocations { get; set; } - public int TotalNumberOfFLRTimesInvokedInHandler { get; set; } - public int NumberOfSLRRetriesPerformed { get; set; } + public int TotalNumberOfImmediateRetriesEventInvocations { get; set; } + public int TotalNumberOfImmediateRetriesTimesInvokedInHandler { get; set; } + public int NumberOfDelayedRetriesPerformed { get; set; } public bool MessageSentToError { get; set; } public Exception MessageSentToErrorException { get; set; } } - public class SLREndpoint : EndpointConfigurationBuilder + public class DelayedRetriesEndpoint : EndpointConfigurationBuilder { - public SLREndpoint() + public DelayedRetriesEndpoint() { EndpointSetup((config, context) => { var testContext = (Context) context.ScenarioContext; var notifications = config.Notifications; config.EnableFeature(); - notifications.Errors.MessageSentToErrorQueue += (sender, message) => + var errors = notifications.Errors; + errors.MessageSentToErrorQueue += (sender, message) => { testContext.MessageSentToErrorException = message.Exception; testContext.MessageSentToError = true; }; - notifications.Errors.MessageHasFailedAFirstLevelRetryAttempt += (sender, retry) => testContext.TotalNumberOfFLREventInvocations++; - notifications.Errors.MessageHasBeenSentToSecondLevelRetries += (sender, retry) => testContext.NumberOfSLRRetriesPerformed++; - }) - .WithConfig(c => { c.MaxRetries = 3; }) - .WithConfig(c => + errors.MessageHasFailedAnImmediateRetryAttempt += (sender, retry) => testContext.TotalNumberOfImmediateRetriesEventInvocations++; + errors.MessageHasBeenSentToDelayedRetries += (sender, retry) => testContext.NumberOfDelayedRetriesPerformed++; + var recoverability = config.Recoverability(); + recoverability.Delayed(settings => + { + settings.NumberOfRetries(2); + settings.TimeIncrease(TimeSpan.FromMilliseconds(1)); + }); + recoverability.Immediate(settings => { - c.NumberOfRetries = 2; - c.TimeIncrease = TimeSpan.FromMilliseconds(1); + settings.NumberOfRetries(3); }); + }); } class MessageToBeRetriedHandler : IHandleMessages @@ -83,7 +87,7 @@ public Task Handle(MessageToBeRetried message, IMessageHandlerContext context) return Task.FromResult(0); // messages from previous test runs must be ignored } - Context.TotalNumberOfFLRTimesInvokedInHandler++; + Context.TotalNumberOfImmediateRetriesTimesInvokedInHandler++; throw new SimulatedException("Simulated exception message"); } diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/Retries/When_custom_policy_always_moves_to_error.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/Retries/When_custom_policy_always_moves_to_error.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/Retries/When_custom_policy_always_moves_to_error.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/Retries/When_custom_policy_always_moves_to_error.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/Retries/When_custom_policy_does_single_delayed_retry_before_move_to_error.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/Retries/When_custom_policy_does_single_delayed_retry_before_move_to_error.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/Retries/When_custom_policy_does_single_delayed_retry_before_move_to_error.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/Retries/When_custom_policy_does_single_delayed_retry_before_move_to_error.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/Retries/When_custom_policy_executed.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/Retries/When_custom_policy_executed.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/Retries/When_custom_policy_executed.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/Retries/When_custom_policy_executed.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/Retries/When_custom_policy_provided.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/Retries/When_custom_policy_provided.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/Retries/When_custom_policy_provided.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/Retries/When_custom_policy_provided.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/Retries/When_performing_slr_and_counting.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/Retries/When_delayed_retries_and_counting.cs similarity index 72% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/Retries/When_performing_slr_and_counting.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/Retries/When_delayed_retries_and_counting.cs index fe0979c54..4d9d1f139 100644 --- a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/Retries/When_performing_slr_and_counting.cs +++ b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/Retries/When_delayed_retries_and_counting.cs @@ -6,13 +6,12 @@ namespace NServiceBus.AcceptanceTests.Recoverability.Retries using AcceptanceTesting; using EndpointTemplates; using Features; - using NServiceBus.Config; using NUnit.Framework; - public class When_performing_slr_and_counting : NServiceBusAcceptanceTest + public class When_delayed_retries_and_counting : NServiceBusAcceptanceTest { [Test] - public async Task Should_reschedule_message_three_times_by_default() + public async Task Should_reschedule_message_the_number_of_times_configured() { var context = await Scenario.Define() .WithEndpoint(b => b @@ -22,10 +21,12 @@ public async Task Should_reschedule_message_three_times_by_default() .Run(TimeSpan.FromSeconds(120)); Assert.IsTrue(context.ForwardedToErrorQueue); - Assert.AreEqual(3, context.Logs.Count(l => l.Message - .StartsWith($"Second Level Retry will reschedule message '{context.PhysicalMessageId}'"))); + Assert.AreEqual(ConfiguredNumberOfImmediateRetries, context.Logs.Count(l => l.Message + .StartsWith($"Delayed Retry will reschedule message '{context.PhysicalMessageId}'"))); } + const int ConfiguredNumberOfImmediateRetries = 3; + class Context : ScenarioContext { public bool ForwardedToErrorQueue { get; set; } @@ -41,8 +42,11 @@ public RetryEndpoint() var scenarioContext = (Context) context.ScenarioContext; configure.EnableFeature(); configure.Notifications.Errors.MessageSentToErrorQueue += (sender, message) => { scenarioContext.ForwardedToErrorQueue = true; }; - }) - .WithConfig(c => c.TimeIncrease = TimeSpan.FromMilliseconds(1)); + + var recoverability = configure.Recoverability(); + recoverability.Immediate(immediate => immediate.NumberOfRetries(0)); + recoverability.Delayed(settings => settings.TimeIncrease(TimeSpan.FromMilliseconds(1)).NumberOfRetries(ConfiguredNumberOfImmediateRetries)); + }); } class MessageToBeRetriedHandler : IHandleMessages diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/Retries/When_performing_slr_with_flr_disabled.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/Retries/When_delayed_retries_with_immediate_retries_disabled.cs similarity index 69% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/Retries/When_performing_slr_with_flr_disabled.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/Retries/When_delayed_retries_with_immediate_retries_disabled.cs index 63122eeeb..742e172ad 100644 --- a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/Retries/When_performing_slr_with_flr_disabled.cs +++ b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/Retries/When_delayed_retries_with_immediate_retries_disabled.cs @@ -5,24 +5,25 @@ using AcceptanceTesting; using EndpointTemplates; using Features; - using NServiceBus.Config; using NUnit.Framework; - public class When_performing_slr_with_flr_disabled : NServiceBusAcceptanceTest + public class When_delayed_retries_with_immediate_retries_disabled : NServiceBusAcceptanceTest { [Test] - public async Task Should_reschedule_message_three_times_by_default() + public async Task Should_reschedule_message_the_configured_number_of_times() { var context = await Scenario.Define(c => { c.Id = Guid.NewGuid(); }) .WithEndpoint(b => b .When((session, ctx) => session.SendLocal(new MessageToBeRetried {Id = ctx.Id})) .DoNotFailOnErrorMessages()) - .Done(c => c.ReceiveCount >= 4) + .Done(c => c.ReceiveCount >= ConfiguredNumberOfDelayedRetries + 1) .Run(); - Assert.AreEqual(4, context.ReceiveCount, "Message should be delivered 4 times. Once initially and retried 3 times by SLR"); + Assert.AreEqual(ConfiguredNumberOfDelayedRetries + 1, context.ReceiveCount, "Message should be delivered 4 times. Once initially and retried 3 times by Delayed Retries"); } + const int ConfiguredNumberOfDelayedRetries = 3; + class Context : ScenarioContext { public Guid Id { get; set; } @@ -36,7 +37,10 @@ public RetryEndpoint() EndpointSetup((configure, context) => { configure.EnableFeature(); - }).WithConfig(c => c.TimeIncrease = TimeSpan.FromMilliseconds(1)); + var recoverability = configure.Recoverability(); + recoverability.Delayed(settings => settings.TimeIncrease(TimeSpan.FromMilliseconds(1)).NumberOfRetries(ConfiguredNumberOfDelayedRetries)); + recoverability.Immediate(settings => settings.NumberOfRetries(0)); + }); } class MessageToBeRetriedHandler : IHandleMessages diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/Retries/When_performing_slr_with_regular_exception.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/Retries/When_delayed_retries_with_regular_exception.cs similarity index 82% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/Retries/When_performing_slr_with_regular_exception.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/Retries/When_delayed_retries_with_regular_exception.cs index edede3bb9..73ce1f576 100644 --- a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/Retries/When_performing_slr_with_regular_exception.cs +++ b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/Retries/When_delayed_retries_with_regular_exception.cs @@ -7,10 +7,9 @@ namespace NServiceBus.AcceptanceTests.Recoverability.Retries using EndpointTemplates; using Features; using MessageMutator; - using NServiceBus.Config; using NUnit.Framework; - public class When_performing_slr_with_regular_exception : NServiceBusAcceptanceTest + public class When_delayed_retries_with_regular_exception : NServiceBusAcceptanceTest { [Test] public async Task Should_preserve_the_original_body_for_regular_exceptions() @@ -19,16 +18,16 @@ public async Task Should_preserve_the_original_body_for_regular_exceptions() .WithEndpoint(b => b .When(session => session.SendLocal(new MessageToBeRetried())) .DoNotFailOnErrorMessages()) - .Done(c => c.SlrChecksum != default(byte)) + .Done(c => c.DelayedRetryChecksum != default(byte)) .Run(TimeSpan.FromSeconds(120)); - Assert.AreEqual(context.OriginalBodyChecksum, context.SlrChecksum, "The body of the message sent to slr should be the same as the original message coming off the queue"); + Assert.AreEqual(context.OriginalBodyChecksum, context.DelayedRetryChecksum, "The body of the message sent to Delayed Retry should be the same as the original message coming off the queue"); } class Context : ScenarioContext { public byte OriginalBodyChecksum { get; set; } - public byte SlrChecksum { get; set; } + public byte DelayedRetryChecksum { get; set; } } public class RetryEndpoint : EndpointConfigurationBuilder @@ -39,10 +38,11 @@ public RetryEndpoint() { var scenarioContext = (Context) context.ScenarioContext; configure.EnableFeature(); - configure.Notifications.Errors.MessageSentToErrorQueue += (sender, message) => { scenarioContext.SlrChecksum = Checksum(message.Body); }; + configure.Notifications.Errors.MessageSentToErrorQueue += (sender, message) => { scenarioContext.DelayedRetryChecksum = Checksum(message.Body); }; configure.RegisterComponents(c => c.ConfigureComponent(DependencyLifecycle.InstancePerCall)); - }) - .WithConfig(c => c.TimeIncrease = TimeSpan.FromMilliseconds(1)); + var recoverability = configure.Recoverability(); + recoverability.Delayed(settings => settings.TimeIncrease(TimeSpan.FromMilliseconds(1))); + }); } public static byte Checksum(byte[] data) diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/Retries/When_performing_slr_with_serialization_exception.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/Retries/When_delayed_retries_with_serialization_exception.cs similarity index 84% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/Retries/When_performing_slr_with_serialization_exception.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/Retries/When_delayed_retries_with_serialization_exception.cs index 84cbf5169..2e6f3c5e2 100644 --- a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/Retries/When_performing_slr_with_serialization_exception.cs +++ b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/Retries/When_delayed_retries_with_serialization_exception.cs @@ -7,10 +7,9 @@ using EndpointTemplates; using Features; using MessageMutator; - using NServiceBus.Config; using NUnit.Framework; - public class When_performing_slr_with_serialization_exception : NServiceBusAcceptanceTest + public class When_delayed_retries_with_serialization_exception : NServiceBusAcceptanceTest { [Test] public async Task Should_preserve_the_original_body_for_serialization_exceptions() @@ -19,16 +18,16 @@ public async Task Should_preserve_the_original_body_for_serialization_exceptions .WithEndpoint(b => b .When(session => session.SendLocal(new MessageToBeRetried())) .DoNotFailOnErrorMessages()) - .Done(c => c.SlrChecksum != default(byte)) + .Done(c => c.DelayedRetryChecksum != default(byte)) .Run(); - Assert.AreEqual(context.OriginalBodyChecksum, context.SlrChecksum, "The body of the message sent to slr should be the same as the original message coming off the queue"); + Assert.AreEqual(context.OriginalBodyChecksum, context.DelayedRetryChecksum, "The body of the message sent to delayed retry should be the same as the original message coming off the queue"); } class Context : ScenarioContext { public byte OriginalBodyChecksum { get; set; } - public byte SlrChecksum { get; set; } + public byte DelayedRetryChecksum { get; set; } public bool ForwardedToErrorQueue { get; set; } } @@ -44,10 +43,10 @@ public RetryEndpoint() configure.Notifications.Errors.MessageSentToErrorQueue += (sender, message) => { testContext.ForwardedToErrorQueue = true; - testContext.SlrChecksum = Checksum(message.Body); + testContext.DelayedRetryChecksum = Checksum(message.Body); }; - }) - .WithConfig(c => c.TimeIncrease = TimeSpan.FromMilliseconds(1)); + configure.Recoverability().Delayed(settings => settings.TimeIncrease(TimeSpan.FromMilliseconds(1))); + }); } static byte Checksum(byte[] data) diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/Retries/When_fails_with_retries_set_to_0.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/Retries/When_fails_with_retries_set_to_0.cs similarity index 89% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/Retries/When_fails_with_retries_set_to_0.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/Retries/When_fails_with_retries_set_to_0.cs index b4d07e8cd..9e14ac61f 100644 --- a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/Retries/When_fails_with_retries_set_to_0.cs +++ b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/Retries/When_fails_with_retries_set_to_0.cs @@ -4,13 +4,12 @@ using System.Threading.Tasks; using AcceptanceTesting; using EndpointTemplates; - using NServiceBus.Config; using NUnit.Framework; public class When_fails_with_retries_set_to_0 : NServiceBusAcceptanceTest { [Test] - public async Task Should_not_retry_the_message_using_flr() + public async Task Should_not_retry_the_message_using_immediate_retries() { var context = await Scenario.Define(c => { c.Id = Guid.NewGuid(); }) .WithEndpoint(b => @@ -24,7 +23,7 @@ public async Task Should_not_retry_the_message_using_flr() .Done(c => c.GaveUp) .Run(); - Assert.AreEqual(1, context.NumberOfTimesInvoked, "No FLR should be in use if MaxRetries is set to 0"); + Assert.AreEqual(1, context.NumberOfTimesInvoked, "No Immediate Retry should be in use if MaxRetries is set to 0"); } class Context : ScenarioContext @@ -42,9 +41,9 @@ public RetryEndpoint() EndpointSetup((configure, context) => { var scenarioContext = (Context) context.ScenarioContext; + configure.Recoverability().Immediate(immediate => immediate.NumberOfRetries(0)); configure.Notifications.Errors.MessageSentToErrorQueue += (sender, message) => scenarioContext.GaveUp = true; - }) - .WithConfig(c => { c.MaxRetries = 0; }); + }); } class MessageToBeRetriedHandler : IHandleMessages diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/Retries/When_doing_flr_with_default_settings.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/Retries/When_immediate_retries_with_default_settings.cs similarity index 96% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/Retries/When_doing_flr_with_default_settings.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/Retries/When_immediate_retries_with_default_settings.cs index 2fb6d23e6..b1be1a072 100644 --- a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/Retries/When_doing_flr_with_default_settings.cs +++ b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/Retries/When_immediate_retries_with_default_settings.cs @@ -7,7 +7,7 @@ using NUnit.Framework; using ScenarioDescriptors; - public class When_doing_flr_with_default_settings : NServiceBusAcceptanceTest + public class When_immediate_retries_with_default_settings : NServiceBusAcceptanceTest { [Test] public async Task Should_not_do_any_retries_if_transactions_are_off() diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/Retries/When_doing_flr_with_dtc_on.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/Retries/When_immediate_retries_with_dtc_on.cs similarity index 79% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/Retries/When_doing_flr_with_dtc_on.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/Retries/When_immediate_retries_with_dtc_on.cs index c37513912..2f5c3db85 100644 --- a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/Retries/When_doing_flr_with_dtc_on.cs +++ b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/Retries/When_immediate_retries_with_dtc_on.cs @@ -5,14 +5,13 @@ using System.Threading.Tasks; using AcceptanceTesting; using EndpointTemplates; - using NServiceBus.Config; using NUnit.Framework; using ScenarioDescriptors; - public class When_doing_flr_with_dtc_on : NServiceBusAcceptanceTest + public class When_immediate_retries_with_dtc_on : NServiceBusAcceptanceTest { [Test] - public Task Should_do_X_retries_by_default_with_dtc_on() + public Task Should_do_the_configured_number_of_retries_with_dtc_on() { return Scenario.Define(c => { c.Id = Guid.NewGuid(); }) .WithEndpoint(b => b @@ -26,9 +25,9 @@ public Task Should_do_X_retries_by_default_with_dtc_on() .Should(c => { //we add 1 since first call + X retries totals to X+1 - Assert.AreEqual(maxretries + 1, c.NumberOfTimesInvoked, $"The FLR should by default retry {maxretries} times"); + Assert.AreEqual(maxretries + 1, c.NumberOfTimesInvoked, $"The Immediate Retries should retry {maxretries} times"); Assert.AreEqual(maxretries, c.Logs.Count(l => l.Message - .StartsWith($"First Level Retry is going to retry message '{c.PhysicalMessageId}' because of an exception:"))); + .StartsWith($"Immediate Retry is going to retry message '{c.PhysicalMessageId}' because of an exception:"))); }) .Run(); } @@ -54,8 +53,10 @@ public RetryEndpoint() { var scenarioContext = (Context) context.ScenarioContext; b.Notifications.Errors.MessageSentToErrorQueue += (sender, message) => scenarioContext.GaveUpOnRetries = true; - }) - .WithConfig(c => c.MaxRetries = maxretries); + var recoverability = b.Recoverability(); + recoverability.Immediate(settings => settings.NumberOfRetries(maxretries)); + recoverability.Delayed(settings => settings.TimeIncrease(TimeSpan.FromMilliseconds(1)).NumberOfRetries(3)); + }); } class MessageToBeRetriedHandler : IHandleMessages diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/Retries/When_doing_flr_with_native_transactions.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/Retries/When_immediate_retries_with_native_transactions.cs similarity index 80% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/Retries/When_doing_flr_with_native_transactions.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/Retries/When_immediate_retries_with_native_transactions.cs index c57e1ad95..b471ee950 100644 --- a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/Retries/When_doing_flr_with_native_transactions.cs +++ b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/Retries/When_immediate_retries_with_native_transactions.cs @@ -8,10 +8,10 @@ using NUnit.Framework; using ScenarioDescriptors; - public class When_doing_flr_with_native_transactions : NServiceBusAcceptanceTest + public class When_immediate_retries_with_native_transactions : NServiceBusAcceptanceTest { [Test] - public Task Should_do_5_retries_by_default_with_native_transactions() + public Task Should_do_the_configured_number_of_retries_with_native_transactions() { return Scenario.Define(c => { c.Id = Guid.NewGuid(); }) .WithEndpoint(b => b @@ -24,9 +24,9 @@ public Task Should_do_5_retries_by_default_with_native_transactions() .Repeat(r => r.For(Transports.Default)) .Should(c => { - Assert.AreEqual(5 + 1, c.NumberOfTimesInvoked, "The FLR should by default retry 5 times"); + Assert.AreEqual(5 + 1, c.NumberOfTimesInvoked, "The Immediate Retries retry 5 times"); Assert.AreEqual(5, c.Logs.Count(l => l.Message - .StartsWith($"First Level Retry is going to retry message '{c.PhysicalMessageId}' because of an exception:"))); + .StartsWith($"Immediate Retry is going to retry message '{c.PhysicalMessageId}' because of an exception:"))); }) .Run(); } @@ -49,8 +49,12 @@ public RetryEndpoint() EndpointSetup((config, context) => { var scenarioContext = (Context) context.ScenarioContext; - config.Recoverability().Immediate(immediate => immediate.NumberOfRetries(5)); config.Notifications.Errors.MessageSentToErrorQueue += (sender, message) => scenarioContext.ForwardedToErrorQueue = true; + + var recoverability = config.Recoverability(); + recoverability.Immediate(immediate => immediate.NumberOfRetries(5)); + recoverability.Delayed(settings => settings.TimeIncrease(TimeSpan.FromMilliseconds(1)).NumberOfRetries(3)); + config.UseTransport(context.GetTransportType()) .Transactions(TransportTransactionMode.ReceiveOnly); }); diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/Retries/When_message_fails_retries.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/Retries/When_message_fails_retries.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/Retries/When_message_fails_retries.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/Retries/When_message_fails_retries.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/Retries/When_message_is_deferred_by_slr_using_dtc.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/Retries/When_message_is_deferred_by_delayed_retries_using_dtc.cs similarity index 90% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/Retries/When_message_is_deferred_by_slr_using_dtc.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/Retries/When_message_is_deferred_by_delayed_retries_using_dtc.cs index fde0304d5..8eac425a0 100644 --- a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/Retries/When_message_is_deferred_by_slr_using_dtc.cs +++ b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/Retries/When_message_is_deferred_by_delayed_retries_using_dtc.cs @@ -7,11 +7,10 @@ using AcceptanceTesting; using EndpointTemplates; using Features; - using NServiceBus.Config; using NUnit.Framework; using ScenarioDescriptors; - public class When_message_is_deferred_by_slr_using_dtc : NServiceBusAcceptanceTest + public class When_message_is_deferred_by_delayed_retries_using_dtc : NServiceBusAcceptanceTest { [Test] public Task Should_not_commit_distributed_transaction() @@ -49,11 +48,12 @@ public Endpoint() { config.EnableFeature(); config.SendFailedMessagesTo(ErrorQueueName); - }) - .WithConfig(slrConfig => - { - slrConfig.NumberOfRetries = 3; - slrConfig.TimeIncrease = TimeSpan.FromSeconds(1); + var recoverability = config.Recoverability(); + recoverability.Delayed(settings => + { + settings.NumberOfRetries(3); + settings.TimeIncrease(TimeSpan.FromSeconds(1)); + }); }); } diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/Retries/When_fails_flr.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/Retries/when_immediate_retries_fail.cs similarity index 74% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/Retries/When_fails_flr.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/Retries/when_immediate_retries_fail.cs index ca250d4bd..d8c049e01 100644 --- a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/Retries/When_fails_flr.cs +++ b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/Retries/when_immediate_retries_fail.cs @@ -5,17 +5,16 @@ using AcceptanceTesting; using EndpointTemplates; using Features; - using NServiceBus.Config; using NUnit.Framework; using ScenarioDescriptors; - public class When_fails_flr : NServiceBusAcceptanceTest + public class when_immediate_retries_fail : NServiceBusAcceptanceTest { [Test] - public Task Should_be_moved_to_slr() + public Task Should_do_delayed_retries() { return Scenario.Define(c => { c.Id = Guid.NewGuid(); }) - .WithEndpoint(b => b + .WithEndpoint(b => b .When((session, context) => session.SendLocal(new MessageToBeRetried { Id = context.Id @@ -25,13 +24,13 @@ public Task Should_be_moved_to_slr() .Repeat(r => r.For(Transports.Default)) .Should(context => { - Assert.GreaterOrEqual(1, context.NumberOfSlrRetriesPerformed, "The SLR should only do one retry"); - Assert.GreaterOrEqual(context.TimeOfSecondAttempt - context.TimeOfFirstAttempt, SlrDelay, "The SLR should delay the retry"); + Assert.GreaterOrEqual(1, context.NumberOfDelayedRetriesPerformed, "Should only do one retry"); + Assert.GreaterOrEqual(context.TimeOfSecondAttempt - context.TimeOfFirstAttempt, Delay, "Should delay the retry"); }) .Run(); } - static TimeSpan SlrDelay = TimeSpan.FromMilliseconds(1); + static TimeSpan Delay = TimeSpan.FromMilliseconds(1); class Context : ScenarioContext { @@ -42,22 +41,22 @@ class Context : ScenarioContext public DateTime TimeOfFirstAttempt { get; set; } public DateTime TimeOfSecondAttempt { get; set; } - public int NumberOfSlrRetriesPerformed { get; set; } + public int NumberOfDelayedRetriesPerformed { get; set; } } - public class SLREndpoint : EndpointConfigurationBuilder + public class DelayedRetryEndpoint : EndpointConfigurationBuilder { - public SLREndpoint() + public DelayedRetryEndpoint() { EndpointSetup(config => { config.EnableFeature(); - }) - .WithConfig(c => + config.Recoverability().Delayed(settings => { - c.NumberOfRetries = 1; - c.TimeIncrease = SlrDelay; + settings.NumberOfRetries(1); + settings.TimeIncrease(Delay); }); + }); } class MessageToBeRetriedHandler : IHandleMessages @@ -85,9 +84,9 @@ public Task Handle(MessageToBeRetried message, IMessageHandlerContext context) string retries; - if (context.MessageHeaders.TryGetValue(Headers.Retries, out retries)) + if (context.MessageHeaders.TryGetValue(Headers.DelayedRetries, out retries)) { - TestContext.NumberOfSlrRetriesPerformed = int.Parse(retries); + TestContext.NumberOfDelayedRetriesPerformed = int.Parse(retries); } throw new SimulatedException(); diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/When_custom_policy_moves_to_overridden_error_queue.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/When_custom_policy_moves_to_overridden_error_queue.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/When_custom_policy_moves_to_overridden_error_queue.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/When_custom_policy_moves_to_overridden_error_queue.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/When_error_is_overridden_in_code.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/When_error_is_overridden_in_code.cs similarity index 88% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/When_error_is_overridden_in_code.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/When_error_is_overridden_in_code.cs index 3b5629af7..135c6daf9 100644 --- a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/When_error_is_overridden_in_code.cs +++ b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/When_error_is_overridden_in_code.cs @@ -4,7 +4,6 @@ using System.Threading.Tasks; using AcceptanceTesting; using EndpointTemplates; - using NServiceBus.Config; using NUnit.Framework; public class When_error_is_overridden_in_code : NServiceBusAcceptanceTest @@ -27,11 +26,7 @@ public class UserEndpoint : EndpointConfigurationBuilder { public UserEndpoint() { - EndpointSetup(b => - { - b.SendFailedMessagesTo("error_with_code_source"); - }) - .WithConfig(c => { c.MaxRetries = 0; }); + EndpointSetup(b => { b.SendFailedMessagesTo("error_with_code_source"); }); } class Handler : IHandleMessages diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/When_message_is_moved_to_error_queue.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/When_message_is_moved_to_error_queue.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/When_message_is_moved_to_error_queue.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/When_message_is_moved_to_error_queue.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/When_message_is_moved_to_error_queue_using_dtc.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/When_message_is_moved_to_error_queue_using_dtc.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/When_message_is_moved_to_error_queue_using_dtc.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/When_message_is_moved_to_error_queue_using_dtc.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/When_message_is_moved_to_error_queue_with_header_customizations.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/When_message_is_moved_to_error_queue_with_header_customizations.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/When_message_is_moved_to_error_queue_with_header_customizations.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/When_message_is_moved_to_error_queue_with_header_customizations.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/When_message_with_TimeToBeReceived_fails.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/When_message_with_TimeToBeReceived_fails.cs similarity index 93% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/When_message_with_TimeToBeReceived_fails.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/When_message_with_TimeToBeReceived_fails.cs index 30f611025..82016f4fb 100644 --- a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Recoverability/When_message_with_TimeToBeReceived_fails.cs +++ b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Recoverability/When_message_with_TimeToBeReceived_fails.cs @@ -4,7 +4,6 @@ using System.Threading.Tasks; using AcceptanceTesting; using EndpointTemplates; - using NServiceBus.Config; using NUnit.Framework; public class When_message_with_TimeToBeReceived_fails : NServiceBusAcceptanceTest @@ -35,11 +34,7 @@ class EndpointThatThrows : EndpointConfigurationBuilder { public EndpointThatThrows() { - EndpointSetup(b => - { - b.SendFailedMessagesTo("errorQueueForAcceptanceTest"); - }) - .WithConfig(c => { c.MaxRetries = 0; }); + EndpointSetup(b => { b.SendFailedMessagesTo("errorQueueForAcceptanceTest"); }); } class ThrowingMessageHandler : IHandleMessages diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Reliability/Outbox/When_a_duplicate_message_arrives.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Reliability/Outbox/When_a_duplicate_message_arrives.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Reliability/Outbox/When_a_duplicate_message_arrives.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Reliability/Outbox/When_a_duplicate_message_arrives.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Reliability/Outbox/When_a_message_is_audited.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Reliability/Outbox/When_a_message_is_audited.cs similarity index 96% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Reliability/Outbox/When_a_message_is_audited.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Reliability/Outbox/When_a_message_is_audited.cs index dd99513c5..4c6e26279 100644 --- a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Reliability/Outbox/When_a_message_is_audited.cs +++ b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Reliability/Outbox/When_a_message_is_audited.cs @@ -40,14 +40,14 @@ public EndpointWithAuditOn() { b.GetSettings().Set("DisableOutboxTransportCheck", true); b.EnableOutbox(); - b.Pipeline.Register("BlowUpAfterDispatchBehavior", typeof(BlowUpAfterDispatchBehavior), "For testing"); + b.Pipeline.Register("BlowUpAfterDispatchBehavior", new BlowUpAfterDispatchBehavior(), "For testing"); }) .AuditTo(); } class BlowUpAfterDispatchBehavior : Behavior { - public async override Task Invoke(IBatchDispatchContext context, Func next) + public override async Task Invoke(IBatchDispatchContext context, Func next) { if (!context.Operations.Any(op => op.Message.Headers[Headers.EnclosedMessageTypes].Contains(typeof(MessageToBeAudited).Name))) { diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Reliability/Outbox/When_blowing_up_just_after_dispatch.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Reliability/Outbox/When_blowing_up_just_after_dispatch.cs similarity index 96% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Reliability/Outbox/When_blowing_up_just_after_dispatch.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Reliability/Outbox/When_blowing_up_just_after_dispatch.cs index 6fc9e1dbe..cdf15d0c8 100644 --- a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Reliability/Outbox/When_blowing_up_just_after_dispatch.cs +++ b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Reliability/Outbox/When_blowing_up_just_after_dispatch.cs @@ -37,13 +37,13 @@ public NonDtcReceivingEndpoint() { b.GetSettings().Set("DisableOutboxTransportCheck", true); b.EnableOutbox(); - b.Pipeline.Register("BlowUpAfterDispatchBehavior", typeof(BlowUpAfterDispatchBehavior), "For testing"); + b.Pipeline.Register("BlowUpAfterDispatchBehavior", new BlowUpAfterDispatchBehavior(), "For testing"); }); } class BlowUpAfterDispatchBehavior : Behavior { - public async override Task Invoke(IBatchDispatchContext context, Func next) + public override async Task Invoke(IBatchDispatchContext context, Func next) { if (!context.Operations.Any(op => op.Message.Headers[Headers.EnclosedMessageTypes].Contains(typeof(PlaceOrder).Name))) { diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Reliability/Outbox/When_clearing_saga_timeouts.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Reliability/Outbox/When_clearing_saga_timeouts.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Reliability/Outbox/When_clearing_saga_timeouts.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Reliability/Outbox/When_clearing_saga_timeouts.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Reliability/Outbox/When_dispatching_forwarded_messages.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Reliability/Outbox/When_dispatching_forwarded_messages.cs similarity index 98% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Reliability/Outbox/When_dispatching_forwarded_messages.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Reliability/Outbox/When_dispatching_forwarded_messages.cs index 1f08027be..2322f139b 100644 --- a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Reliability/Outbox/When_dispatching_forwarded_messages.cs +++ b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Reliability/Outbox/When_dispatching_forwarded_messages.cs @@ -40,7 +40,7 @@ public EndpointWithAuditOn() { b.GetSettings().Set("DisableOutboxTransportCheck", true); b.EnableOutbox(); - b.Pipeline.Register("BlowUpAfterDispatchBehavior", typeof(BlowUpAfterDispatchBehavior), "For testing"); + b.Pipeline.Register("BlowUpAfterDispatchBehavior", new BlowUpAfterDispatchBehavior(), "For testing"); b.ForwardReceivedMessagesTo("forward_receiver_outbox"); }); } diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Reliability/Outbox/When_receiving_a_message.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Reliability/Outbox/When_receiving_a_message.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Reliability/Outbox/When_receiving_a_message.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Reliability/Outbox/When_receiving_a_message.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Reliability/Outbox/When_sending_from_a_non_dtc_endpoint.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Reliability/Outbox/When_sending_from_a_non_dtc_endpoint.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Reliability/Outbox/When_sending_from_a_non_dtc_endpoint.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Reliability/Outbox/When_sending_from_a_non_dtc_endpoint.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/AutomaticSubscriptions/When_starting_an_endpoint_with_a_saga.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/AutomaticSubscriptions/When_starting_an_endpoint_with_a_saga.cs similarity index 92% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/AutomaticSubscriptions/When_starting_an_endpoint_with_a_saga.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/AutomaticSubscriptions/When_starting_an_endpoint_with_a_saga.cs index b719bc527..fabb59667 100644 --- a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/AutomaticSubscriptions/When_starting_an_endpoint_with_a_saga.cs +++ b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/AutomaticSubscriptions/When_starting_an_endpoint_with_a_saga.cs @@ -37,12 +37,12 @@ class Subscriber : EndpointConfigurationBuilder { public Subscriber() { - EndpointSetup(c => c.Pipeline.Register("SubscriptionSpy", typeof(SubscriptionSpy), "Spies on subscriptions made")) - .AddMapping(typeof(Subscriber)) //just map to our self for this test + EndpointSetup(c => c.Pipeline.Register("SubscriptionSpy", new SubscriptionSpy((Context)ScenarioContext), "Spies on subscriptions made")) + .AddMapping(typeof(Subscriber)) //just map to our self for this test .AddMapping(typeof(Subscriber)); //just map to our self for this test } - public class SubscriptionSpy : Behavior + class SubscriptionSpy : Behavior { public SubscriptionSpy(Context testContext) { @@ -106,10 +106,6 @@ public class MyEventWithParent : MyEventBase { } - public class MyMessage : IMessage - { - } - public class MyEvent : IEvent { public string SomeId { get; set; } diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/AutomaticSubscriptions/When_starting_an_endpoint_with_a_saga_autosubscribe_disabled.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/AutomaticSubscriptions/When_starting_an_endpoint_with_a_saga_autosubscribe_disabled.cs similarity index 96% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/AutomaticSubscriptions/When_starting_an_endpoint_with_a_saga_autosubscribe_disabled.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/AutomaticSubscriptions/When_starting_an_endpoint_with_a_saga_autosubscribe_disabled.cs index 782cfb61d..9556fe8e7 100644 --- a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/AutomaticSubscriptions/When_starting_an_endpoint_with_a_saga_autosubscribe_disabled.cs +++ b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/AutomaticSubscriptions/When_starting_an_endpoint_with_a_saga_autosubscribe_disabled.cs @@ -37,12 +37,12 @@ class Subscriber : EndpointConfigurationBuilder { public Subscriber() { - EndpointSetup(c => c.Pipeline.Register("SubscriptionSpy", typeof(SubscriptionSpy), "Spies on subscriptions made")) + EndpointSetup(c => c.Pipeline.Register("SubscriptionSpy", new SubscriptionSpy((Context)ScenarioContext), "Spies on subscriptions made")) .AddMapping(typeof(Subscriber)) //just map to our self for this test .AddMapping(typeof(Subscriber)); //just map to our self for this test } - public class SubscriptionSpy : Behavior + class SubscriptionSpy : Behavior { public SubscriptionSpy(Context testContext) { diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/AutomaticSubscriptions/When_starting_an_endpoint_with_autoSubscribe.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/AutomaticSubscriptions/When_starting_an_endpoint_with_autoSubscribe.cs similarity index 96% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/AutomaticSubscriptions/When_starting_an_endpoint_with_autoSubscribe.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/AutomaticSubscriptions/When_starting_an_endpoint_with_autoSubscribe.cs index 2b13cd395..cc6a36b52 100644 --- a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/AutomaticSubscriptions/When_starting_an_endpoint_with_autoSubscribe.cs +++ b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/AutomaticSubscriptions/When_starting_an_endpoint_with_autoSubscribe.cs @@ -41,14 +41,14 @@ class Subscriber : EndpointConfigurationBuilder { public Subscriber() { - EndpointSetup(c => c.Pipeline.Register("SubscriptionSpy", typeof(SubscriptionSpy), "Spies on subscriptions made")) + EndpointSetup(c => c.Pipeline.Register("SubscriptionSpy", new SubscriptionSpy((Context)ScenarioContext), "Spies on subscriptions made")) .AddMapping(typeof(Subscriber)) //just map to our self for this test .AddMapping(typeof(Subscriber)) //just map to our self for this test .AddMapping(typeof(Subscriber)) //just map to our self for this test .AddMapping(typeof(Subscriber)); //just map to our self for this test } - public class SubscriptionSpy : Behavior + class SubscriptionSpy : Behavior { public SubscriptionSpy(Context testContext) { diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/SubscriptionBehavior.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/SubscriptionBehavior.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/SubscriptionBehavior.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/SubscriptionBehavior.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/SubscriptionBehaviorExtensions.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/SubscriptionBehaviorExtensions.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/SubscriptionBehaviorExtensions.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/SubscriptionBehaviorExtensions.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/SubscriptionEventArgs.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/SubscriptionEventArgs.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/SubscriptionEventArgs.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/SubscriptionEventArgs.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/When_base_event_from_2_publishers.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_base_event_from_2_publishers.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/When_base_event_from_2_publishers.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_base_event_from_2_publishers.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_configure_routes_for_unobtrusive_messages.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_configure_routes_for_unobtrusive_messages.cs new file mode 100644 index 000000000..bedd46ed3 --- /dev/null +++ b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_configure_routes_for_unobtrusive_messages.cs @@ -0,0 +1,100 @@ +namespace NServiceBus.AcceptanceTests.Routing +{ + using System.Threading.Tasks; + using AcceptanceTesting; + using AcceptanceTesting.Customization; + using Configuration.AdvanceExtensibility; + using EndpointTemplates; + using NUnit.Framework; + + public class When_configure_routes_for_unobtrusive_messages : NServiceBusAcceptanceTest + { + [Test] + public async Task Should_use_routes_from_routing_api() + { + var context = await Scenario.Define() + .WithEndpoint(e => e + .When(s => s.Send(new SomeCommand()))) + .WithEndpoint() + .Done(c => c.ReceivedMessage) + .Run(); + + Assert.That(context.ReceivedMessage, Is.True); + } + + [Test] + public async Task Should_use_routes_from_endpoint_mapping() + { + var context = await Scenario.Define() + .WithEndpoint(e => e + .When(s => s.Send(new SomeCommand()))) + .WithEndpoint() + .Done(c => c.ReceivedMessage) + .Run(); + + Assert.That(context.ReceivedMessage, Is.True); + } + + public class Context : ScenarioContext + { + public bool ReceivedMessage { get; set; } + } + + public class SendingEndpointUsingRoutingApi : EndpointConfigurationBuilder + { + public SendingEndpointUsingRoutingApi() + { + EndpointSetup(c => + { + c.Conventions().DefiningCommandsAs(t => t == typeof(SomeCommand)); + + var routing = new RoutingSettings(c.GetSettings()); + routing.RouteToEndpoint(typeof(SomeCommand).Assembly, Conventions.EndpointNamingConvention(typeof(ReceivingEndpoint))); + }).ExcludeType(); //exclude type to simulate an unobtrusive message assembly which isn't automatically loaded. + } + } + + public class SendingEndpointUsingEndpointMapping : EndpointConfigurationBuilder + { + public SendingEndpointUsingEndpointMapping() + { + EndpointSetup(c => + { + c.Conventions().DefiningCommandsAs(t => t == typeof(SomeCommand)); + }) + .AddMapping(typeof(ReceivingEndpoint)) + .ExcludeType(); //exclude type to simulate an unobtrusive message assembly which isn't automatically loaded. + } + } + + public class ReceivingEndpoint : EndpointConfigurationBuilder + { + public ReceivingEndpoint() + { + EndpointSetup(c => c + .Conventions() + .DefiningCommandsAs(t => t == typeof(SomeCommand))); + } + + public class CommandHandler : IHandleMessages + { + Context testContext; + + public CommandHandler(Context testContext) + { + this.testContext = testContext; + } + + public Task Handle(SomeCommand message, IMessageHandlerContext context) + { + testContext.ReceivedMessage = true; + return Task.FromResult(0); + } + } + } + + public class SomeCommand + { + } + } +} \ No newline at end of file diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/When_handler_exists_but_routing_information_is_missing.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_handler_exists_but_routing_information_is_missing.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/When_handler_exists_but_routing_information_is_missing.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_handler_exists_but_routing_information_is_missing.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/When_multi_subscribing_to_a_polymorphic_event_on_multicast_transports.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_multi_subscribing_to_a_polymorphic_event_on_multicast_transports.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/When_multi_subscribing_to_a_polymorphic_event_on_multicast_transports.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_multi_subscribing_to_a_polymorphic_event_on_multicast_transports.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/When_multi_subscribing_to_a_polymorphic_event_on_unicast_transports.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_multi_subscribing_to_a_polymorphic_event_on_unicast_transports.cs similarity index 95% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/When_multi_subscribing_to_a_polymorphic_event_on_unicast_transports.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_multi_subscribing_to_a_polymorphic_event_on_unicast_transports.cs index 2649dcf23..22b9a4c4a 100644 --- a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/When_multi_subscribing_to_a_polymorphic_event_on_unicast_transports.cs +++ b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_multi_subscribing_to_a_polymorphic_event_on_unicast_transports.cs @@ -53,7 +53,7 @@ public Publisher1() { EndpointSetup(b => { - //FLR on since subscription storages can throw on concurrency violation and need to retry + //Immediate Retries on since subscription storages can throw on concurrency violation and need to retry b.Recoverability().Immediate(immediate => immediate.NumberOfRetries(5)); b.OnEndpointSubscribed((args, context) => { @@ -73,7 +73,7 @@ public Publisher2() { EndpointSetup(b => { - //FLR on since subscription storages can throw on concurrency violation and need to retry + // Immediate Retries on since subscription storages can throw on concurrency violation and need to retry b.Recoverability().Immediate(immediate => immediate.NumberOfRetries(5)); b.OnEndpointSubscribed((args, context) => diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/When_publishing.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_publishing.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/When_publishing.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_publishing.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/When_publishing_an_event_implementing_two_unrelated_interfaces.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_publishing_an_event_implementing_two_unrelated_interfaces.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/When_publishing_an_event_implementing_two_unrelated_interfaces.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_publishing_an_event_implementing_two_unrelated_interfaces.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/When_publishing_an_interface.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_publishing_an_interface.cs similarity index 96% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/When_publishing_an_interface.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_publishing_an_interface.cs index 560742b9c..94ff75aeb 100644 --- a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/When_publishing_an_interface.cs +++ b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_publishing_an_interface.cs @@ -48,7 +48,7 @@ public Publisher() { EndpointSetup(c => { - c.Pipeline.Register("EventTypeSpy", typeof(EventTypeSpy), "EventTypeSpy"); + c.Pipeline.Register("EventTypeSpy", new EventTypeSpy((Context)ScenarioContext), "EventTypeSpy"); c.OnEndpointSubscribed((s, context) => { if (s.SubscriberReturnAddress.Contains("Subscriber")) diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_publishing_an_interface_with_unobtrusive.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_publishing_an_interface_with_unobtrusive.cs new file mode 100644 index 000000000..3f8c10fed --- /dev/null +++ b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_publishing_an_interface_with_unobtrusive.cs @@ -0,0 +1,108 @@ +namespace NServiceBus.AcceptanceTests.Routing +{ + using System; + using System.Threading.Tasks; + using AcceptanceTesting; + using EndpointTemplates; + using Features; + using NServiceBus.Pipeline; + using NUnit.Framework; + using ScenarioDescriptors; + + public class When_publishing_an_interface_with_unobtrusive : NServiceBusAcceptanceTest + { + [Test] + public async Task Should_receive_event_for_non_xml() + { + await Scenario.Define() + .WithEndpoint(b => + b.When(c => c.Subscribed, (session, ctx) => session.Publish())) + .WithEndpoint(b => b.When(async (session, context) => + { + await session.Subscribe(); + if (context.HasNativePubSubSupport) + { + context.Subscribed = true; + } + })) + .Done(c => c.GotTheEvent) + .Repeat(r => r.For(Serializers.Json)) + .Should(c => + { + Assert.True(c.GotTheEvent); + Assert.AreEqual(typeof(MyEvent), c.EventTypePassedToRouting); + }) + .Run(); + } + + public class Context : ScenarioContext + { + public bool GotTheEvent { get; set; } + public bool Subscribed { get; set; } + public Type EventTypePassedToRouting { get; set; } + } + + public class Publisher : EndpointConfigurationBuilder + { + public Publisher() + { + EndpointSetup(c => + { + c.Conventions().DefiningEventsAs(t => t.Namespace != null && t.Name.EndsWith("Event")); + c.Pipeline.Register("EventTypeSpy", typeof(EventTypeSpy), "EventTypeSpy"); + c.OnEndpointSubscribed((s, context) => + { + if (s.SubscriberReturnAddress.Contains("Subscriber")) + { + context.Subscribed = true; + } + }); + }).ExcludeType(); // remove that type from assembly scanning to simulate what would happen with true unobtrusive mode + } + + class EventTypeSpy : Behavior + { + public EventTypeSpy(Context testContext) + { + this.testContext = testContext; + } + + public override Task Invoke(IOutgoingLogicalMessageContext context, Func next) + { + testContext.EventTypePassedToRouting = context.Message.MessageType; + return next(); + } + + Context testContext; + } + } + + public class Subscriber : EndpointConfigurationBuilder + { + public Subscriber() + { + EndpointSetup(c => + { + c.Conventions().DefiningEventsAs(t => t.Namespace != null && t.Name.EndsWith("Event")); + c.DisableFeature(); + }) + .AddMapping(typeof(Publisher)); + } + + public class MyEventHandler : IHandleMessages + { + public Context Context { get; set; } + + public Task Handle(MyEvent @event, IMessageHandlerContext context) + { + Context.GotTheEvent = true; + return Task.FromResult(0); + } + } + } + + public interface MyEvent + { + } + } +} \ No newline at end of file diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/When_publishing_from_sendonly.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_publishing_from_sendonly.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/When_publishing_from_sendonly.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_publishing_from_sendonly.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/When_publishing_to_scaled_out_subscribers_on_multicast_transports.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_publishing_to_scaled_out_subscribers_on_multicast_transports.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/When_publishing_to_scaled_out_subscribers_on_multicast_transports.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_publishing_to_scaled_out_subscribers_on_multicast_transports.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/When_publishing_to_scaled_out_subscribers_on_unicast_transports.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_publishing_to_scaled_out_subscribers_on_unicast_transports.cs similarity index 97% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/When_publishing_to_scaled_out_subscribers_on_unicast_transports.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_publishing_to_scaled_out_subscribers_on_unicast_transports.cs index 490d7af41..961b264cc 100644 --- a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/When_publishing_to_scaled_out_subscribers_on_unicast_transports.cs +++ b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_publishing_to_scaled_out_subscribers_on_unicast_transports.cs @@ -71,7 +71,7 @@ public class SubscriberA : EndpointConfigurationBuilder { public SubscriberA() { - EndpointSetup(c => { c.RegisterPublisherForType(typeof(MyEvent), PublisherEndpoint); }); + EndpointSetup(c => { c.RegisterPublisher(typeof(MyEvent), PublisherEndpoint); }); } public class MyEventHandler : IHandleMessages @@ -90,7 +90,7 @@ public class SubscriberB : EndpointConfigurationBuilder { public SubscriberB() { - EndpointSetup(c => { c.RegisterPublisherForType(typeof(MyEvent), PublisherEndpoint); }); + EndpointSetup(c => { c.RegisterPublisher(typeof(MyEvent), PublisherEndpoint); }); } public class MyEventHandler : IHandleMessages diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/When_publishing_using_root_type.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_publishing_using_root_type.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/When_publishing_using_root_type.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_publishing_using_root_type.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/When_publishing_with_only_local_messagehandlers.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_publishing_with_only_local_messagehandlers.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/When_publishing_with_only_local_messagehandlers.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_publishing_with_only_local_messagehandlers.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/When_publishing_with_overridden_local_address.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_publishing_with_overridden_local_address.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/When_publishing_with_overridden_local_address.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_publishing_with_overridden_local_address.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_registering_publishers_unobtrusive_messages.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_registering_publishers_unobtrusive_messages.cs new file mode 100644 index 000000000..cee4543af --- /dev/null +++ b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_registering_publishers_unobtrusive_messages.cs @@ -0,0 +1,138 @@ +namespace NServiceBus.AcceptanceTests.Routing +{ + using System.Threading.Tasks; + using AcceptanceTesting; + using Configuration.AdvanceExtensibility; + using EndpointTemplates; + using NUnit.Framework; + using AcceptanceTesting.Customization; + using NServiceBus.Routing; + using ScenarioDescriptors; + using Settings; + using Transport; + + public class When_registering_publishers_unobtrusive_messages : NServiceBusAcceptanceTest + { + [Test] + public Task Should_use_routes_from_routing_api() + { + return Scenario.Define() + .WithEndpoint(e => e + .When(c => c.Subscribed, s => s.Publish(new SomeEvent()))) + .WithEndpoint() + .Done(c => c.ReceivedMessage) + .Repeat(r => r.For()) + .Should(context => + { + Assert.That(context.Subscribed, Is.True); + Assert.That(context.ReceivedMessage, Is.True); + }) + .Run(); + } + + [Test] + public Task Should_use_routes_from_endpoint_mapping() + { + return Scenario.Define() + .WithEndpoint(e => e + .When(c => c.Subscribed, s => s.Publish(new SomeEvent()))) + .WithEndpoint() + .Done(c => c.ReceivedMessage) + .Repeat(r => r.For()) + .Should(context => + { + Assert.That(context.Subscribed, Is.True); + Assert.That(context.ReceivedMessage, Is.True); + }) + .Run(); + } + + public class Context : ScenarioContext + { + public bool Subscribed { get; set; } + public bool ReceivedMessage { get; set; } + } + + public class Publisher : EndpointConfigurationBuilder + { + public Publisher() + { + EndpointSetup(c => + { + c.OnEndpointSubscribed((e, ctx) => ctx.Subscribed = true); + c.Conventions().DefiningEventsAs(t => t == typeof(SomeEvent)); + }).ExcludeType(); + } + } + + public class SubscriberUsingRoutingApi : EndpointConfigurationBuilder + { + public SubscriberUsingRoutingApi() + { + EndpointSetup(c => + { + c.Conventions().DefiningEventsAs(t => t == typeof(SomeEvent)); + + var routing = new RoutingSettings(c.GetSettings()); + routing.RegisterPublisher(typeof(SomeEvent).Assembly, Conventions.EndpointNamingConvention(typeof(Publisher))); + }); + } + + public class EventHandler : IHandleMessages + { + Context testContext; + + public EventHandler(Context testContext) + { + this.testContext = testContext; + } + + public Task Handle(SomeEvent message, IMessageHandlerContext context) + { + testContext.ReceivedMessage = true; + return Task.FromResult(0); + } + } + } + + public class SubscriberUsingEndpointMappings : EndpointConfigurationBuilder + { + public SubscriberUsingEndpointMappings() + { + EndpointSetup(c => c + .Conventions().DefiningEventsAs(t => t == typeof(SomeEvent))) + .AddMapping(typeof(Publisher)); + } + + public class EventHandler : IHandleMessages + { + Context testContext; + + public EventHandler(Context testContext) + { + this.testContext = testContext; + } + + public Task Handle(SomeEvent message, IMessageHandlerContext context) + { + testContext.ReceivedMessage = true; + return Task.FromResult(0); + } + } + } + + class MessageDrivenPubSubTransportDefinition : TransportDefinition, IMessageDrivenSubscriptionTransport + { + public override string ExampleConnectionStringForErrorMessage { get; } + + public override TransportInfrastructure Initialize(SettingsHolder settings, string connectionString) + { + throw new System.NotImplementedException(); + } + } + + public class SomeEvent + { + } + } +} \ No newline at end of file diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/When_replying_to_message.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_replying_to_message.cs similarity index 96% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/When_replying_to_message.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_replying_to_message.cs index 71015db16..88ac15f24 100644 --- a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/When_replying_to_message.cs +++ b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_replying_to_message.cs @@ -4,6 +4,7 @@ using AcceptanceTesting; using EndpointTemplates; using NUnit.Framework; + using Conventions = AcceptanceTesting.Customization.Conventions; public class When_replying_to_message : NServiceBusAcceptanceTest { @@ -25,11 +26,9 @@ public async Task Should_reply_to_originator() [Test] public async Task Should_reply_to_configured_return_address() { - const string returnAddress = "ReplyingToMessage.OtherEndpoint"; - var ctx = await Scenario.Define() .WithEndpoint(c => c - .CustomConfig(b => b.OverridePublicReturnAddress(returnAddress)) + .CustomConfig(b => b.OverridePublicReturnAddress(Conventions.EndpointNamingConvention(typeof(OtherEndpoint)))) .When(b => b.Send(new MyMessage()))) .WithEndpoint() .WithEndpoint() diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_replying_to_message_with_interface.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_replying_to_message_with_interface.cs new file mode 100644 index 000000000..ee2c03898 --- /dev/null +++ b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_replying_to_message_with_interface.cs @@ -0,0 +1,95 @@ +namespace NServiceBus.AcceptanceTests.Routing +{ + using System.Threading.Tasks; + using AcceptanceTesting; + using EndpointTemplates; + using NUnit.Framework; + + public class When_replying_to_message_with_interface_and_unobtrusive : NServiceBusAcceptanceTest + { + [Test] + public async Task Should_reply_to_originator() + { + var ctx = await Scenario.Define() + .WithEndpoint(c => c + .When(b => b.Send(new MyMessage()))) + .WithEndpoint() + .WithEndpoint() + .Done(c => c.SendingEndpointGotResponse) + .Run(); + + Assert.IsTrue(ctx.SendingEndpointGotResponse); + Assert.IsFalse(ctx.OtherEndpointGotResponse); + } + + public class Context : ScenarioContext + { + public bool SendingEndpointGotResponse { get; set; } + public bool OtherEndpointGotResponse { get; set; } + } + + public class SendingEndpoint : EndpointConfigurationBuilder + { + public SendingEndpoint() + { + EndpointSetup(c => c.Conventions().DefiningMessagesAs(t => t.Namespace != null && t.Name.StartsWith("My"))) + .AddMapping(typeof(ReplyingEndpoint)); + } + + public class ResponseHandler : IHandleMessages + { + public Context Context { get; set; } + + public Task Handle(MyReply messageThatIsEnlisted, IMessageHandlerContext context) + { + Context.SendingEndpointGotResponse = true; + return Task.FromResult(0); + } + } + } + + public class OtherEndpoint : EndpointConfigurationBuilder + { + public OtherEndpoint() + { + EndpointSetup(c => c.Conventions().DefiningMessagesAs(t => t.Namespace != null && t.Name.StartsWith("My"))); + } + + public class ResponseHandler : IHandleMessages + { + public Context Context { get; set; } + + public Task Handle(MyReply messageThatIsEnlisted, IMessageHandlerContext context) + { + Context.OtherEndpointGotResponse = true; + return Task.FromResult(0); + } + } + } + + public class ReplyingEndpoint : EndpointConfigurationBuilder + { + public ReplyingEndpoint() + { + EndpointSetup(c => c.Conventions().DefiningMessagesAs(t => t.Namespace != null && t.Name.StartsWith("My"))) + .ExcludeType(); // remove that type from assembly scanning to simulate what would happen with true unobtrusive mode + } + + public class MessageHandler : IHandleMessages + { + public Task Handle(MyMessage message, IMessageHandlerContext context) + { + return context.Reply(m => { }); + } + } + } + + public class MyMessage + { + } + + public interface MyReply + { + } + } +} \ No newline at end of file diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/When_subscribing_to_a_polymorphic_event.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_subscribing_to_a_polymorphic_event.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/When_subscribing_to_a_polymorphic_event.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_subscribing_to_a_polymorphic_event.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_subscribing_to_scaled_out_publisher_on_unicast_transport.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_subscribing_to_scaled_out_publisher_on_unicast_transport.cs new file mode 100644 index 000000000..c75dccd74 --- /dev/null +++ b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_subscribing_to_scaled_out_publisher_on_unicast_transport.cs @@ -0,0 +1,69 @@ +namespace NServiceBus.AcceptanceTests.Routing +{ + using System.Collections.Generic; + using System.Threading.Tasks; + using AcceptanceTesting; + using AcceptanceTesting.Customization; + using Configuration.AdvanceExtensibility; + using EndpointTemplates; + using NServiceBus.Routing; + using NServiceBus.Routing.MessageDrivenSubscriptions; + using NUnit.Framework; + using ScenarioDescriptors; + + public class When_subscribing_to_scaled_out_publisher_on_unicast_transport : NServiceBusAcceptanceTest + { + [Test] + public Task Should_send_subscription_message_to_each_instance() + { + return Scenario.Define() + .WithEndpoint(b => b.CustomConfig(c => c.MakeInstanceUniquelyAddressable("1"))) + .WithEndpoint(b => b.CustomConfig(c => c.MakeInstanceUniquelyAddressable("2"))) + .WithEndpoint(b => b.When(s => s.Subscribe())) + .Done(c => c.PublisherReceivedSubscription.Count >= 2) + .Repeat(r => r.For()) + .Should(c => + { + // each instance should receive a subscription message + Assert.That(c.PublisherReceivedSubscription, Does.Contain("1")); + Assert.That(c.PublisherReceivedSubscription, Does.Contain("2")); + Assert.That(c.PublisherReceivedSubscription.Count, Is.EqualTo(2)); + }) + .Run(); + } + + class Context : ScenarioContext + { + public List PublisherReceivedSubscription { get; } = new List(); + } + + class ScaledOutPublisher : EndpointConfigurationBuilder + { + public ScaledOutPublisher() + { + // store the instance discriminator of each instance receiving a subscription message: + EndpointSetup(c => c + .OnEndpointSubscribed((subscription, context) => + context.PublisherReceivedSubscription.Add(c.GetSettings().Get("EndpointInstanceDiscriminator")))); + } + } + + class Subscriber : EndpointConfigurationBuilder + { + public Subscriber() + { + EndpointSetup(c => + { + // configure the scaled out publisher instances: + var publisherName = Conventions.EndpointNamingConvention(typeof(ScaledOutPublisher)); + c.GetSettings().GetOrCreate().Add(typeof(MyEvent), publisherName); + c.GetSettings().GetOrCreate().Add(new EndpointInstance(publisherName, "1"), new EndpointInstance(publisherName, "2")); + }); + } + } + + class MyEvent : IEvent + { + } + } +} \ No newline at end of file diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/When_using_assembly_level_message_mapping_for_pub_sub.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_using_assembly_level_message_mapping_for_pub_sub.cs similarity index 99% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/When_using_assembly_level_message_mapping_for_pub_sub.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_using_assembly_level_message_mapping_for_pub_sub.cs index d7627dda1..9212f5865 100644 --- a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/When_using_assembly_level_message_mapping_for_pub_sub.cs +++ b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_using_assembly_level_message_mapping_for_pub_sub.cs @@ -102,14 +102,14 @@ public Task Handle(DoneCommand message, IMessageHandlerContext context) } } } - + public class MyEvent : IEvent { } - + public class DoneCommand : ICommand { - + } } } \ No newline at end of file diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/When_using_instance_ids.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_using_instance_ids.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/When_using_instance_ids.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_using_instance_ids.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/When_using_legacy_routing_configuration_combined_with_message_driven_pub_sub.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_using_legacy_routing_configuration_combined_with_message_driven_pub_sub.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/When_using_legacy_routing_configuration_combined_with_message_driven_pub_sub.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/When_using_legacy_routing_configuration_combined_with_message_driven_pub_sub.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/when_replying_to_a_message_sent_to_specific_instance.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/when_replying_to_a_message_sent_to_specific_instance.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Routing/when_replying_to_a_message_sent_to_specific_instance.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Routing/when_replying_to_a_message_sent_to_specific_instance.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/RunDescriptorExtensions.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/RunDescriptorExtensions.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/RunDescriptorExtensions.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/RunDescriptorExtensions.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_a_base_class_mapped_is_handled_by_a_saga.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_a_base_class_mapped_is_handled_by_a_saga.cs new file mode 100644 index 000000000..cdaa2ecbf --- /dev/null +++ b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_a_base_class_mapped_is_handled_by_a_saga.cs @@ -0,0 +1,90 @@ +namespace NServiceBus.AcceptanceTests.Sagas +{ + using System; + using System.Threading.Tasks; + using AcceptanceTesting; + using EndpointTemplates; + using NUnit.Framework; + + [TestFixture] + public class When_a_base_class_mapped_is_handled_by_a_saga : NServiceBusAcceptanceTest + { + [Test] + public async Task Should_find_existing_instance() + { + var correlationId = Guid.NewGuid(); + var context = await Scenario.Define() + .WithEndpoint(b => b.When(session => + { + var startSagaMessage = new StartSagaMessage + { + SomeId = correlationId + }; + return session.SendLocal(startSagaMessage); + })) + .Done(c => c.SecondMessageFoundExistingSaga) + .Run(TimeSpan.FromSeconds(20)); + + Assert.True(context.SecondMessageFoundExistingSaga); + } + + public class Context : ScenarioContext + { + public bool SecondMessageFoundExistingSaga { get; set; } + } + + public class SagaEndpoint : EndpointConfigurationBuilder + { + public SagaEndpoint() + { + EndpointSetup(); + } + + public class BaseClassIsMappedSaga : Saga, + IAmStartedByMessages, + IAmStartedByMessages + { + public Context TestContext { get; set; } + + public Task Handle(SecondSagaMessage message, IMessageHandlerContext context) + { + TestContext.SecondMessageFoundExistingSaga = true; + return Task.FromResult(0); + } + + public Task Handle(StartSagaMessage message, IMessageHandlerContext context) + { + var sagaMessage = new SecondSagaMessage + { + SomeId = message.SomeId + }; + return context.SendLocal(sagaMessage); + } + + protected override void ConfigureHowToFindSaga(SagaPropertyMapper mapper) + { + mapper.ConfigureMapping(m => m.SomeId) + .ToSaga(s => s.SomeId); + } + + public class BaseClassIsMappedSagaData : ContainSagaData + { + public virtual Guid SomeId { get; set; } + } + } + } + + public class StartSagaMessage : SagaMessageBase + { + } + + public class SecondSagaMessage : SagaMessageBase + { + } + + public class SagaMessageBase : IMessage + { + public Guid SomeId { get; set; } + } + } +} \ No newline at end of file diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_a_base_class_message_hits_a_saga.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_a_base_class_message_starts_a_saga.cs similarity index 71% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_a_base_class_message_hits_a_saga.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_a_base_class_message_starts_a_saga.cs index 978b06cd3..e5a4e518a 100644 --- a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_a_base_class_message_hits_a_saga.cs +++ b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_a_base_class_message_starts_a_saga.cs @@ -4,21 +4,24 @@ using System.Threading.Tasks; using AcceptanceTesting; using EndpointTemplates; - using Features; using NUnit.Framework; [TestFixture] - public class When_a_base_class_message_hits_a_saga : NServiceBusAcceptanceTest + public class When_a_base_class_message_starts_a_saga : NServiceBusAcceptanceTest { [Test] public async Task Should_find_existing_instance() { var correlationId = Guid.NewGuid(); var context = await Scenario.Define() - .WithEndpoint(b => b.When(session => session.SendLocal(new StartSagaMessage + .WithEndpoint(b => b.When(session => { - SomeId = correlationId - }))) + var startSagaMessage = new StartSagaMessage + { + SomeId = correlationId + }; + return session.SendLocal(startSagaMessage); + })) .Done(c => c.SecondMessageFoundExistingSaga) .Run(TimeSpan.FromSeconds(20)); @@ -34,10 +37,11 @@ public class SagaEndpoint : EndpointConfigurationBuilder { public SagaEndpoint() { - EndpointSetup(c => c.EnableFeature()); + EndpointSetup(); } - public class TestSaga04 : Saga, IAmStartedByMessages + public class BaseClassStartsSaga : Saga, + IAmStartedByMessages { public Context TestContext { get; set; } @@ -49,22 +53,23 @@ public Task Handle(StartSagaMessageBase message, IMessageHandlerContext context) } else { - return context.SendLocal(new StartSagaMessage + var startSagaMessage = new StartSagaMessage { SomeId = message.SomeId - }); + }; + return context.SendLocal(startSagaMessage); } return Task.FromResult(0); } - protected override void ConfigureHowToFindSaga(SagaPropertyMapper mapper) + protected override void ConfigureHowToFindSaga(SagaPropertyMapper mapper) { mapper.ConfigureMapping(m => m.SomeId) .ToSaga(s => s.SomeId); } - public class SagaData04 : ContainSagaData + public class BaseClassStartsSagaData : ContainSagaData { public virtual Guid SomeId { get; set; } } diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_a_existing_saga_instance_exists.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_a_existing_saga_instance_exists.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_a_existing_saga_instance_exists.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_a_existing_saga_instance_exists.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_a_finder_exists.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_a_finder_exists.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_a_finder_exists.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_a_finder_exists.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_a_finder_exists_and_context_information_added.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_a_finder_exists_and_context_information_added.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_a_finder_exists_and_context_information_added.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_a_finder_exists_and_context_information_added.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_a_finder_exists_and_found_saga.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_a_finder_exists_and_found_saga.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_a_finder_exists_and_found_saga.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_a_finder_exists_and_found_saga.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_an_endpoint_replies_to_a_saga.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_an_endpoint_replies_to_a_saga.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_an_endpoint_replies_to_a_saga.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_an_endpoint_replies_to_a_saga.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_auto_correlated_property_is_changed.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_auto_correlated_property_is_changed.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_auto_correlated_property_is_changed.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_auto_correlated_property_is_changed.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_doing_request_response_between_sagas.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_doing_request_response_between_sagas.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_doing_request_response_between_sagas.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_doing_request_response_between_sagas.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_doing_request_response_between_sagas_first_handler_responding.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_doing_request_response_between_sagas_first_handler_responding.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_doing_request_response_between_sagas_first_handler_responding.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_doing_request_response_between_sagas_first_handler_responding.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_doing_request_response_between_sagas_response_from_noninitiating.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_doing_request_response_between_sagas_response_from_noninitiating.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_doing_request_response_between_sagas_response_from_noninitiating.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_doing_request_response_between_sagas_response_from_noninitiating.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_doing_request_response_between_sagas_with_timeout.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_doing_request_response_between_sagas_with_timeout.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_doing_request_response_between_sagas_with_timeout.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_doing_request_response_between_sagas_with_timeout.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_forgetting_to_set_a_corr_property.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_forgetting_to_set_a_corr_property.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_forgetting_to_set_a_corr_property.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_forgetting_to_set_a_corr_property.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_message_has_a_saga_id.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_message_has_a_saga_id.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_message_has_a_saga_id.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_message_has_a_saga_id.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_receiving_that_completes_the_saga.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_receiving_that_completes_the_saga.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_receiving_that_completes_the_saga.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_receiving_that_completes_the_saga.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_receiving_that_should_start_a_saga.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_receiving_that_should_start_a_saga.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_receiving_that_should_start_a_saga.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_receiving_that_should_start_a_saga.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_receiving_that_should_start_a_saga_with_interception.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_receiving_that_should_start_a_saga_with_interception.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_receiving_that_should_start_a_saga_with_interception.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_receiving_that_should_start_a_saga_with_interception.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_receiving_that_should_start_a_saga_without_interception.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_receiving_that_should_start_a_saga_without_interception.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_receiving_that_should_start_a_saga_without_interception.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_receiving_that_should_start_a_saga_without_interception.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_replies_to_message_published_by_a_saga.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_replies_to_message_published_by_a_saga.cs similarity index 92% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_replies_to_message_published_by_a_saga.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_replies_to_message_published_by_a_saga.cs index 65d06f0e5..ed03d7587 100644 --- a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_replies_to_message_published_by_a_saga.cs +++ b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_replies_to_message_published_by_a_saga.cs @@ -5,7 +5,6 @@ using AcceptanceTesting; using EndpointTemplates; using Features; - using NServiceBus.Config; using NUnit.Framework; using Routing; using ScenarioDescriptors; @@ -46,10 +45,11 @@ public class ReplyEndpoint : EndpointConfigurationBuilder { public ReplyEndpoint() { - EndpointSetup(b => b.DisableFeature()) - .AddMapping(typeof(SagaEndpoint)) - .WithConfig(c => { c.MaxRetries = 0; }) - .WithConfig(c => { c.Enabled = false; }); + EndpointSetup(b => + { + b.DisableFeature(); + }) + .AddMapping(typeof(SagaEndpoint)); } class DidSomethingHandler : IHandleMessages @@ -107,19 +107,16 @@ public class ReplyToPubMsgSagaData : ContainSagaData } } - [Serializable] public class StartSaga : ICommand { public Guid DataId { get; set; } } - [Serializable] public class DidSomething : IEvent { public Guid DataId { get; set; } } - [Serializable] public class DidSomethingResponse : IMessage { public Guid ReceivedDataId { get; set; } diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_saga_handles_unmapped_message.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_saga_handles_unmapped_message.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_saga_handles_unmapped_message.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_saga_handles_unmapped_message.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_saga_has_a_non_empty_constructor.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_saga_has_a_non_empty_constructor.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_saga_has_a_non_empty_constructor.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_saga_has_a_non_empty_constructor.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_saga_id_changed.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_saga_id_changed.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_saga_id_changed.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_saga_id_changed.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_saga_is_mapped_to_complex_expression.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_saga_is_mapped_to_complex_expression.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_saga_is_mapped_to_complex_expression.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_saga_is_mapped_to_complex_expression.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_a_saga_message_goes_through_the_slr.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_saga_message_goes_through_delayed_retries.cs similarity index 84% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_a_saga_message_goes_through_the_slr.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_saga_message_goes_through_delayed_retries.cs index 58e3f3741..0c645bde8 100644 --- a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_a_saga_message_goes_through_the_slr.cs +++ b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_saga_message_goes_through_delayed_retries.cs @@ -5,18 +5,17 @@ using AcceptanceTesting; using EndpointTemplates; using Features; - using NServiceBus.Config; using NUnit.Framework; using ScenarioDescriptors; //repro for issue: https://github.com/NServiceBus/NServiceBus/issues/1020 - public class When_a_saga_message_goes_through_the_slr : NServiceBusAcceptanceTest + public class When_saga_message_goes_through_delayed_retries : NServiceBusAcceptanceTest { [Test] public Task Should_invoke_the_correct_handle_methods_on_the_saga() { return Scenario.Define() - .WithEndpoint(b => b + .WithEndpoint(b => b .When(session => session.SendLocal(new StartSagaMessage { SomeId = Guid.NewGuid() @@ -29,21 +28,22 @@ public Task Should_invoke_the_correct_handle_methods_on_the_saga() public class Context : ScenarioContext { public bool SecondMessageProcessed { get; set; } - public int NumberOfTimesInvoked { get; set; } } - public class SagaMsgThruSlrEndpt : EndpointConfigurationBuilder + public class SagaMessageThroughDelayedRetryEndpoint : EndpointConfigurationBuilder { - public SagaMsgThruSlrEndpt() + public SagaMessageThroughDelayedRetryEndpoint() { EndpointSetup(b => { b.EnableFeature(); - }).WithConfig(slr => - { - slr.NumberOfRetries = 1; - slr.TimeIncrease = TimeSpan.FromMilliseconds(1); + var recoverability = b.Recoverability(); + recoverability.Delayed(settings => + { + settings.NumberOfRetries(1); + settings.TimeIncrease(TimeSpan.FromMilliseconds(1)); + }); }); } diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_sagas_cant_be_found.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_sagas_cant_be_found.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_sagas_cant_be_found.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_sagas_cant_be_found.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_sending_from_a_saga_handle.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_sending_from_a_saga_handle.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_sending_from_a_saga_handle.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_sending_from_a_saga_handle.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_sending_from_a_saga_timeout.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_sending_from_a_saga_timeout.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_sending_from_a_saga_timeout.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_sending_from_a_saga_timeout.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_started_by_base_event_from_other_saga.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_started_by_base_event_from_other_saga.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_started_by_base_event_from_other_saga.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_started_by_base_event_from_other_saga.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_started_by_event_from_another_saga.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_started_by_event_from_another_saga.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_started_by_event_from_another_saga.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_started_by_event_from_another_saga.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_timeout_hit_not_found_saga.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_timeout_hit_not_found_saga.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_timeout_hit_not_found_saga.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_timeout_hit_not_found_saga.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_two_sagas_subscribe_to_the_same_event.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_two_sagas_subscribe_to_the_same_event.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_two_sagas_subscribe_to_the_same_event.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_two_sagas_subscribe_to_the_same_event.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_updating_existing_correlation_property.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_updating_existing_correlation_property.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_updating_existing_correlation_property.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_updating_existing_correlation_property.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_using_ReplyToOriginator.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_using_ReplyToOriginator.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_using_ReplyToOriginator.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_using_ReplyToOriginator.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_using_a_received_message_for_timeout.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_using_a_received_message_for_timeout.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_using_a_received_message_for_timeout.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_using_a_received_message_for_timeout.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_using_contain_saga_data.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_using_contain_saga_data.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/When_using_contain_saga_data.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/When_using_contain_saga_data.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/when_receiving_multiple_timeouts.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/when_receiving_multiple_timeouts.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/when_receiving_multiple_timeouts.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/when_receiving_multiple_timeouts.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/when_reply_from_saga_not_found_handler.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/when_reply_from_saga_not_found_handler.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Sagas/when_reply_from_saga_not_found_handler.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Sagas/when_reply_from_saga_not_found_handler.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Satellites/When_a_message_is_available.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Satellites/When_a_message_is_available.cs similarity index 74% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Satellites/When_a_message_is_available.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Satellites/When_a_message_is_available.cs index 4df8aaf0a..fd8f7a2ee 100644 --- a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Satellites/When_a_message_is_available.cs +++ b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Satellites/When_a_message_is_available.cs @@ -18,11 +18,17 @@ public async Task Should_receive_the_message() .Run(); Assert.True(context.MessageReceived); + // In the future we want the transport transaction to be an explicit + // concept in the persisters API as well. Adding transport transaction + // to the context will not be necessary at that point. + // See GitHub issue #4047 for more background information. + Assert.True(context.TransportTransactionAddedToContext); } class Context : ScenarioContext { public bool MessageReceived { get; set; } + public bool TransportTransactionAddedToContext { get; set; } } class Endpoint : EndpointConfigurationBuilder @@ -49,7 +55,9 @@ protected override void Setup(FeatureConfigurationContext context) (c, ec) => RecoverabilityAction.MoveToError(c.Failed.ErrorQueue), (builder, pushContext) => { - builder.Build().MessageReceived = true; + var testContext = builder.Build(); + testContext.MessageReceived = true; + testContext.TransportTransactionAddedToContext = ReferenceEquals(pushContext.Context.Get(), pushContext.TransportTransaction); return Task.FromResult(true); }); diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/ScenarioDescriptors/AllOutboxCapableStorages.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/ScenarioDescriptors/AllOutboxCapableStorages.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/ScenarioDescriptors/AllOutboxCapableStorages.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/ScenarioDescriptors/AllOutboxCapableStorages.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/ScenarioDescriptors/AllTransports.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/ScenarioDescriptors/AllTransports.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/ScenarioDescriptors/AllTransports.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/ScenarioDescriptors/AllTransports.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/ScenarioDescriptors/Builders.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/ScenarioDescriptors/Builders.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/ScenarioDescriptors/Builders.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/ScenarioDescriptors/Builders.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/ScenarioDescriptors/EnvironmentHelper.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/ScenarioDescriptors/EnvironmentHelper.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/ScenarioDescriptors/EnvironmentHelper.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/ScenarioDescriptors/EnvironmentHelper.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/ScenarioDescriptors/Persistence.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/ScenarioDescriptors/Persistence.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/ScenarioDescriptors/Persistence.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/ScenarioDescriptors/Persistence.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/ScenarioDescriptors/Serializers.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/ScenarioDescriptors/Serializers.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/ScenarioDescriptors/Serializers.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/ScenarioDescriptors/Serializers.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/ScenarioDescriptors/Transports.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/ScenarioDescriptors/Transports.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/ScenarioDescriptors/Transports.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/ScenarioDescriptors/Transports.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Scheduling/When_scheduling_a_recurring_task.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Scheduling/When_scheduling_a_recurring_task.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Scheduling/When_scheduling_a_recurring_task.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Scheduling/When_scheduling_a_recurring_task.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/SelfVerification/When_running_saga_tests.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/SelfVerification/When_running_saga_tests.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/SelfVerification/When_running_saga_tests.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/SelfVerification/When_running_saga_tests.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Serialization/When_configuring_custom_xml_namespace.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Serialization/When_configuring_custom_xml_namespace.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Serialization/When_configuring_custom_xml_namespace.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Serialization/When_configuring_custom_xml_namespace.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Serialization/When_registering_additional_deserializers.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Serialization/When_registering_additional_deserializers.cs similarity index 74% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Serialization/When_registering_additional_deserializers.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Serialization/When_registering_additional_deserializers.cs index 346d4392a..a2912773b 100644 --- a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Serialization/When_registering_additional_deserializers.cs +++ b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Serialization/When_registering_additional_deserializers.cs @@ -27,7 +27,7 @@ public async Task Two_endpoints_with_different_serializers_should_deserialize_th return session.Send(new MyRequest()); })) .WithEndpoint() - .Done(c => c.DeserializeCalled) + .Done(c => c.HandlerGotTheRequest) .Run(); Assert.True(context.HandlerGotTheRequest); @@ -36,7 +36,7 @@ public async Task Two_endpoints_with_different_serializers_should_deserialize_th Assert.AreEqual("SomeFancySettings", context.ValueFromSettings); } - class Context : ScenarioContext + public class Context : ScenarioContext { public bool HandlerGotTheRequest { get; set; } public bool SerializeCalled { get; set; } @@ -48,7 +48,7 @@ class CustomSerializationSender : EndpointConfigurationBuilder { public CustomSerializationSender() { - EndpointSetup(c => c.UseSerialization()) + EndpointSetup(c => c.UseSerialization().Settings((Context) ScenarioContext, "")) .AddMapping(typeof(XmlCustomSerializationReceiver)); } } @@ -60,7 +60,7 @@ public XmlCustomSerializationReceiver() EndpointSetup(c => { c.UseSerialization(); - c.AddDeserializer().Settings("SomeFancySettings"); + c.AddDeserializer().Settings((Context) ScenarioContext, "SomeFancySettings"); }); } @@ -71,9 +71,6 @@ class MyRequestHandler : IHandleMessages public Task Handle(MyRequest request, IMessageHandlerContext context) { Context.HandlerGotTheRequest = true; - Context.DeserializeCalled = request.DeserializerCalled; - Context.SerializeCalled = request.SerializerCalled; - Context.ValueFromSettings = request.ValueFromSettings; return Task.FromResult(0); } } @@ -82,26 +79,22 @@ public Task Handle(MyRequest request, IMessageHandlerContext context) [Serializable] class MyRequest : IMessage { - public bool DeserializerCalled { get; set; } - public bool SerializerCalled { get; set; } - public string ValueFromSettings { get; set; } } - public class MyCustomSerializer : SerializationDefinition { public override Func Configure(ReadOnlySettings settings) { - return mapper => new MyCustomMessageSerializer(settings.GetOrDefault("MyCustomSerializer.Settings")); + var context = settings.Get(); + return mapper => new MyCustomMessageSerializer(context, settings.Get("MyCustomSerializer.Settings.Value")); } } class MyCustomMessageSerializer : IMessageSerializer { - readonly string valueFromSettings; - - public MyCustomMessageSerializer(string valueFromSettings) + public MyCustomMessageSerializer(Context context, string valueFromSettings) { + this.context = context; this.valueFromSettings = valueFromSettings; } @@ -109,8 +102,7 @@ public void Serialize(object message, Stream stream) { var serializer = new BinaryFormatter(); - ((MyRequest) message).SerializerCalled = true; - ((MyRequest) message).ValueFromSettings = valueFromSettings; + context.SerializeCalled = true; serializer.Serialize(stream, message); } @@ -121,8 +113,9 @@ public object[] Deserialize(Stream stream, IList messageTypes = null) stream.Position = 0; var msg = serializer.Deserialize(stream); - ((MyRequest) msg).DeserializerCalled = true; - ((MyRequest)msg).ValueFromSettings = valueFromSettings; + context.DeserializeCalled = true; + context.ValueFromSettings = valueFromSettings; + return new[] { msg @@ -130,15 +123,18 @@ public object[] Deserialize(Stream stream, IList messageTypes = null) } public string ContentType => "MyCustomSerializer"; + readonly Context context; + readonly string valueFromSettings; } } static class CustomSettingsForMyCustomSerializer { - public static SerializationExtensions Settings(this SerializationExtensions extensions, string valueFromSettings) + public static void Settings(this SerializationExtensions extensions, When_registering_additional_deserializers.Context context, string valueFromSettings) { - extensions.GetSettings().Set("MyCustomSerializer.Settings", valueFromSettings); - return extensions; + var settings = extensions.GetSettings(); + settings.Set("MyCustomSerializer.Settings", context); + settings.Set("MyCustomSerializer.Settings.Value", valueFromSettings); } } } \ No newline at end of file diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Serialization/When_registering_custom_serializer.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Serialization/When_registering_custom_serializer.cs similarity index 80% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Serialization/When_registering_custom_serializer.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Serialization/When_registering_custom_serializer.cs index a040e50a4..511ecf91a 100644 --- a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Serialization/When_registering_custom_serializer.cs +++ b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Serialization/When_registering_custom_serializer.cs @@ -6,6 +6,7 @@ using System.Runtime.Serialization.Formatters.Binary; using System.Threading.Tasks; using AcceptanceTesting; + using Configuration.AdvanceExtensibility; using EndpointTemplates; using MessageInterfaces; using NServiceBus.Serialization; @@ -19,11 +20,7 @@ public async Task Should_use_the_custom_serializer() { var context = await Scenario.Define() .WithEndpoint(b => b.When( - (session, c) => session.SendLocal(new MyRequest - { - Serialized = false, - Deserialized = false - }))) + (session, c) => session.SendLocal(new MyRequest()))) .Done(c => c.HandlerGotTheRequest) .Run(); @@ -42,7 +39,12 @@ public class EndpointWithCustomSerializer : EndpointConfigurationBuilder { public EndpointWithCustomSerializer() { - EndpointSetup(c => c.UseSerialization()); + var context = (Context) ScenarioContext; + EndpointSetup(c => + { + c.UseSerialization(); + c.GetSettings().Set(context); + }); } public class MyRequestHandler : IHandleMessages @@ -52,8 +54,6 @@ public class MyRequestHandler : IHandleMessages public Task Handle(MyRequest request, IMessageHandlerContext context) { Context.HandlerGotTheRequest = true; - Context.DeserializeCalled = request.Deserialized; - Context.SerializeCalled = request.Serialized; return Task.FromResult(0); } } @@ -62,23 +62,26 @@ public Task Handle(MyRequest request, IMessageHandlerContext context) [Serializable] public class MyRequest : IMessage { - public bool Serialized { get; set; } - public bool Deserialized { get; set; } } class MySuperSerializer : SerializationDefinition { public override Func Configure(ReadOnlySettings settings) { - return mapper => new MyCustomSerializer(); + return mapper => new MyCustomSerializer(settings.Get()); } } class MyCustomSerializer : IMessageSerializer { + public MyCustomSerializer(Context context) + { + this.context = context; + } + public void Serialize(object message, Stream stream) { - ((MyRequest) message).Serialized = true; + context.SerializeCalled = true; var serializer = new BinaryFormatter(); serializer.Serialize(stream, message); @@ -91,7 +94,7 @@ public object[] Deserialize(Stream stream, IList messageTypes = null) stream.Position = 0; var msg = serializer.Deserialize(stream); - ((MyRequest) msg).Deserialized = true; + context.DeserializeCalled = true; return new[] { @@ -100,6 +103,7 @@ public object[] Deserialize(Stream stream, IList messageTypes = null) } public string ContentType => "MyCustomSerializer"; + readonly Context context; } } } \ No newline at end of file diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Serialization/When_registering_deserializers_with_settings.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Serialization/When_registering_deserializers_with_settings.cs new file mode 100644 index 000000000..b3ee8a973 --- /dev/null +++ b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Serialization/When_registering_deserializers_with_settings.cs @@ -0,0 +1,140 @@ +namespace NServiceBus.AcceptanceTests.Serialization +{ + using System; + using System.Collections.Generic; + using System.IO; + using System.Runtime.Serialization.Formatters.Binary; + using System.Threading.Tasks; + using AcceptanceTesting; + using Configuration.AdvanceExtensibility; + using EndpointTemplates; + using MessageInterfaces; + using NServiceBus.Serialization; + using NUnit.Framework; + using Settings; + + public class When_registering_deserializers_with_settings : NServiceBusAcceptanceTest + { + const string Value1 = "SomeFancySettingsForMainSerializer"; + const string Value2 = "SomeFancySettingsForDeserializer"; + + [Test] + public async Task Should_not_override_serializer_settings() + { + var context = await Scenario.Define() + .WithEndpoint(b => b.When( + (session, c) => + { + var sendOptions = new SendOptions(); + sendOptions.SetHeader("ContentType", "MyCustomSerializer"); + return session.SendLocal(new MyRequest()); + })) + .WithEndpoint() + .Done(c => c.DeserializeCalled) + .Run(); + + Assert.True(context.HandlerGotTheRequest); + Assert.True(context.SerializeCalled); + Assert.True(context.DeserializeCalled); + Assert.AreEqual(Value1, context.ValueFromSettingsForMainSerializer); + Assert.AreEqual(Value2, context.ValueFromSettingsForDeserializer); + } + + public class Context : ScenarioContext + { + public bool HandlerGotTheRequest { get; set; } + public bool SerializeCalled { get; set; } + public bool DeserializeCalled { get; set; } + public string ValueFromSettingsForMainSerializer { get; set; } + public string ValueFromSettingsForDeserializer { get; set; } + } + + class XmlCustomSerializationReceiver : EndpointConfigurationBuilder + { + public XmlCustomSerializationReceiver() + { + var context = (Context)ScenarioContext; + EndpointSetup(c => + { + c.UseSerialization().Settings(Value1, context); + c.AddDeserializer().Settings(Value2, context); + }); + } + + class MyRequestHandler : IHandleMessages + { + public Context Context { get; set; } + + public Task Handle(MyRequest request, IMessageHandlerContext context) + { + Context.HandlerGotTheRequest = true; + return Task.FromResult(0); + } + } + } + + [Serializable] + class MyRequest : IMessage + { + } + + + public class MyCustomSerializer : SerializationDefinition + { + public override Func Configure(ReadOnlySettings settings) + { + return mapper => new MyCustomMessageSerializer(settings.GetOrDefault("MyCustomSerializer.Settings"), settings.Get()); + } + } + + class MyCustomMessageSerializer : IMessageSerializer + { + readonly string valueFromSettings; + readonly Context context; + + public MyCustomMessageSerializer(string valueFromSettings, Context context) + { + this.valueFromSettings = valueFromSettings; + this.context = context; + } + + public void Serialize(object message, Stream stream) + { + var serializer = new BinaryFormatter(); + + context.SerializeCalled = true; + context.ValueFromSettingsForMainSerializer = valueFromSettings; + + serializer.Serialize(stream, message); + } + + public object[] Deserialize(Stream stream, IList messageTypes = null) + { + var serializer = new BinaryFormatter(); + + stream.Position = 0; + var msg = serializer.Deserialize(stream); + context.DeserializeCalled = true; + context.ValueFromSettingsForDeserializer = valueFromSettings; + + return new[] + { + msg + }; + } + + public string ContentType => "MyCustomSerializer"; + } + } + + static class CustomSettingsForMyCustomSerializer2 + { + public static SerializationExtensions Settings(this SerializationExtensions extensions, string valueFromSettings, When_registering_deserializers_with_settings.Context context) + { + var settings = extensions.GetSettings(); + settings.Set("MyCustomSerializer.Settings", valueFromSettings); + settings.Set(context); + return extensions; + } + } +} \ No newline at end of file diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Serialization/When_sanitizing_xml_messages.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Serialization/When_sanitizing_xml_messages.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Serialization/When_sanitizing_xml_messages.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Serialization/When_sanitizing_xml_messages.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Serialization/When_skip_wrapping_xml.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Serialization/When_skip_wrapping_xml.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Serialization/When_skip_wrapping_xml.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Serialization/When_skip_wrapping_xml.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Serialization/When_wrapping_is_not_skipped.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Serialization/When_wrapping_is_not_skipped.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Serialization/When_wrapping_is_not_skipped.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Serialization/When_wrapping_is_not_skipped.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Timeout/CyclingOutageTimeoutPersister.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Timeout/CyclingOutageTimeoutPersister.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Timeout/CyclingOutageTimeoutPersister.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Timeout/CyclingOutageTimeoutPersister.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Timeout/When_timeout_storage_is_unavailable_temporarily.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Timeout/When_timeout_storage_is_unavailable_temporarily.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Timeout/When_timeout_storage_is_unavailable_temporarily.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Timeout/When_timeout_storage_is_unavailable_temporarily.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Tx/FakePromotableResourceManager.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Tx/FakePromotableResourceManager.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Tx/FakePromotableResourceManager.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Tx/FakePromotableResourceManager.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Tx/ImmediateDispatch/When_requesting_immediate_dispatch_using_scope_suppress.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Tx/ImmediateDispatch/When_requesting_immediate_dispatch_using_scope_suppress.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Tx/ImmediateDispatch/When_requesting_immediate_dispatch_using_scope_suppress.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Tx/ImmediateDispatch/When_requesting_immediate_dispatch_using_scope_suppress.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Tx/ImmediateDispatch/When_requesting_immediate_dispatch_with_at_least_once.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Tx/ImmediateDispatch/When_requesting_immediate_dispatch_with_at_least_once.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Tx/ImmediateDispatch/When_requesting_immediate_dispatch_with_at_least_once.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Tx/ImmediateDispatch/When_requesting_immediate_dispatch_with_at_least_once.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Tx/ImmediateDispatch/When_requesting_immediate_dispatch_with_at_most_once.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Tx/ImmediateDispatch/When_requesting_immediate_dispatch_with_at_most_once.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Tx/ImmediateDispatch/When_requesting_immediate_dispatch_with_at_most_once.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Tx/ImmediateDispatch/When_requesting_immediate_dispatch_with_at_most_once.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Tx/ImmediateDispatch/When_requesting_immediate_dispatch_with_exactly_once.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Tx/ImmediateDispatch/When_requesting_immediate_dispatch_with_exactly_once.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Tx/ImmediateDispatch/When_requesting_immediate_dispatch_with_exactly_once.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Tx/ImmediateDispatch/When_requesting_immediate_dispatch_with_exactly_once.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Tx/Issue_2481.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Tx/Issue_2481.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Tx/Issue_2481.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Tx/Issue_2481.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Tx/When_receiving_with_dtc_enabled.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Tx/When_receiving_with_dtc_enabled.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Tx/When_receiving_with_dtc_enabled.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Tx/When_receiving_with_dtc_enabled.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Tx/When_receiving_with_native_multi_queue_transaction.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Tx/When_receiving_with_native_multi_queue_transaction.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Tx/When_receiving_with_native_multi_queue_transaction.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Tx/When_receiving_with_native_multi_queue_transaction.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Tx/When_receiving_with_the_default_settings.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Tx/When_receiving_with_the_default_settings.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Tx/When_receiving_with_the_default_settings.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Tx/When_receiving_with_the_default_settings.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Tx/When_sending_within_an_ambient_transaction.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Tx/When_sending_within_an_ambient_transaction.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Tx/When_sending_within_an_ambient_transaction.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Tx/When_sending_within_an_ambient_transaction.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/UnicastPubSubExtensions.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/UnicastPubSubExtensions.cs similarity index 72% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/UnicastPubSubExtensions.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/UnicastPubSubExtensions.cs index 5d6a262c0..004d97d60 100644 --- a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/UnicastPubSubExtensions.cs +++ b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/UnicastPubSubExtensions.cs @@ -6,7 +6,7 @@ namespace NServiceBus.AcceptanceTests.Routing static class UnicastPubSubExtensions { - public static void RegisterPublisherForType(this EndpointConfiguration config, Type eventType, string publisherEndpoint) + public static void RegisterPublisher(this EndpointConfiguration config, Type eventType, string publisherEndpoint) { config.GetSettings().GetOrCreate().Add(eventType, publisherEndpoint); } diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Versioning/When_multiple_versions_of_a_message_is_published.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Versioning/When_multiple_versions_of_a_message_is_published.cs similarity index 100% rename from src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0006/Versioning/When_multiple_versions_of_a_message_is_published.cs rename to src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.6.0.0-beta0007/Versioning/When_multiple_versions_of_a_message_is_published.cs diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/MultiSchema/When_custom_schema_configured_with_bracketed_transport_discriminator.cs b/src/NServiceBus.SqlServer.AcceptanceTests/MultiSchema/When_custom_schema_configured_with_bracketed_transport_discriminator.cs index 6fa9b2832..b2be049ea 100644 --- a/src/NServiceBus.SqlServer.AcceptanceTests/MultiSchema/When_custom_schema_configured_with_bracketed_transport_discriminator.cs +++ b/src/NServiceBus.SqlServer.AcceptanceTests/MultiSchema/When_custom_schema_configured_with_bracketed_transport_discriminator.cs @@ -32,7 +32,7 @@ public Sender() { var ReceiverName = $"{EndpointNamingConvention(typeof(Receiver))}"; - c.UseTransport(r.GetTransportType()).GetSettings().GetOrCreate().RouteToAddress(typeof(Message), $"{ReceiverName}@[{ReceiverSchema}]"); + c.UseTransport(r.GetTransportType()).GetSettings().GetOrCreate().RouteTo(typeof(Message), UnicastRoute.CreateFromPhysicalAddress($"{ReceiverName}@[{ReceiverSchema}]")); }); } } diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/MultiSchema/When_custom_schema_configured_with_message_mappings.cs b/src/NServiceBus.SqlServer.AcceptanceTests/MultiSchema/When_custom_schema_configured_with_message_mappings.cs index 8dceeaf05..85e72b82c 100644 --- a/src/NServiceBus.SqlServer.AcceptanceTests/MultiSchema/When_custom_schema_configured_with_message_mappings.cs +++ b/src/NServiceBus.SqlServer.AcceptanceTests/MultiSchema/When_custom_schema_configured_with_message_mappings.cs @@ -30,7 +30,7 @@ public Sender() { EndpointSetup((c, r) => { - c.UseTransport(r.GetTransportType()).GetSettings().GetOrCreate().RouteToAddress(typeof(Message), $"{EndpointNamingConvention(typeof(Receiver))}@{ReceiverSchema}"); + c.UseTransport(r.GetTransportType()).GetSettings().GetOrCreate().RouteTo(typeof(Message), UnicastRoute.CreateFromPhysicalAddress($"{EndpointNamingConvention(typeof(Receiver))}@{ReceiverSchema}")); }); } } diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/MultiSchema/When_custom_schema_configured_with_transport_discriminator.cs b/src/NServiceBus.SqlServer.AcceptanceTests/MultiSchema/When_custom_schema_configured_with_transport_discriminator.cs index bedabaebb..bed4d4350 100644 --- a/src/NServiceBus.SqlServer.AcceptanceTests/MultiSchema/When_custom_schema_configured_with_transport_discriminator.cs +++ b/src/NServiceBus.SqlServer.AcceptanceTests/MultiSchema/When_custom_schema_configured_with_transport_discriminator.cs @@ -32,7 +32,7 @@ public Sender() { var ReceiverName = $"{EndpointNamingConvention(typeof(Receiver))}"; - c.UseTransport(r.GetTransportType()).GetSettings().GetOrCreate().RouteToAddress(typeof(Message), $"{ReceiverName}@{ReceiverSchema}"); + c.UseTransport(r.GetTransportType()).GetSettings().GetOrCreate().RouteTo(typeof(Message), UnicastRoute.CreateFromPhysicalAddress($"{ReceiverName}@{ReceiverSchema}")); }); } } diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/NServiceBus.SqlServer.AcceptanceTests.csproj b/src/NServiceBus.SqlServer.AcceptanceTests/NServiceBus.SqlServer.AcceptanceTests.csproj index 0d11a043f..32b0bbeb4 100644 --- a/src/NServiceBus.SqlServer.AcceptanceTests/NServiceBus.SqlServer.AcceptanceTests.csproj +++ b/src/NServiceBus.SqlServer.AcceptanceTests/NServiceBus.SqlServer.AcceptanceTests.csproj @@ -44,11 +44,11 @@ - ..\packages\NServiceBus.AcceptanceTesting.6.0.0-beta0006\lib\net452\NServiceBus.AcceptanceTesting.dll + ..\packages\NServiceBus.AcceptanceTesting.6.0.0-beta0007\lib\net452\NServiceBus.AcceptanceTesting.dll True - ..\packages\NServiceBus.6.0.0-beta0006\lib\net452\NServiceBus.Core.dll + ..\packages\NServiceBus.6.0.0-beta0007\lib\net452\NServiceBus.Core.dll True @@ -72,222 +72,233 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/packages.config b/src/NServiceBus.SqlServer.AcceptanceTests/packages.config index ffb1d6956..abf5f6e87 100644 --- a/src/NServiceBus.SqlServer.AcceptanceTests/packages.config +++ b/src/NServiceBus.SqlServer.AcceptanceTests/packages.config @@ -1,8 +1,8 @@  - - - + + + \ No newline at end of file diff --git a/src/NServiceBus.SqlServer.IntegrationTests/NServiceBus.SqlServer.IntegrationTests.csproj b/src/NServiceBus.SqlServer.IntegrationTests/NServiceBus.SqlServer.IntegrationTests.csproj index 60358ff06..ec6a39829 100644 --- a/src/NServiceBus.SqlServer.IntegrationTests/NServiceBus.SqlServer.IntegrationTests.csproj +++ b/src/NServiceBus.SqlServer.IntegrationTests/NServiceBus.SqlServer.IntegrationTests.csproj @@ -49,11 +49,11 @@ True - ..\packages\NServiceBus.6.0.0-beta0006\lib\net452\NServiceBus.Core.dll + ..\packages\NServiceBus.6.0.0-beta0007\lib\net452\NServiceBus.Core.dll True - ..\packages\NServiceBus.NHibernate.7.0.0-beta0005\lib\net452\NServiceBus.NHibernate.dll + ..\packages\NServiceBus.NHibernate.7.0.0-beta0006\lib\net452\NServiceBus.NHibernate.dll True diff --git a/src/NServiceBus.SqlServer.IntegrationTests/packages.config b/src/NServiceBus.SqlServer.IntegrationTests/packages.config index 2f56876d3..a4cad4021 100644 --- a/src/NServiceBus.SqlServer.IntegrationTests/packages.config +++ b/src/NServiceBus.SqlServer.IntegrationTests/packages.config @@ -2,7 +2,7 @@ - - + + \ No newline at end of file diff --git a/src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0006/IConfigureTransportInfrastructure.cs b/src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0007/IConfigureTransportInfrastructure.cs similarity index 100% rename from src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0006/IConfigureTransportInfrastructure.cs rename to src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0007/IConfigureTransportInfrastructure.cs diff --git a/src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0006/NServiceBusTransportTest.cs b/src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0007/NServiceBusTransportTest.cs similarity index 94% rename from src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0006/NServiceBusTransportTest.cs rename to src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0007/NServiceBusTransportTest.cs index 51feada78..575c6a66c 100644 --- a/src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0006/NServiceBusTransportTest.cs +++ b/src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0007/NServiceBusTransportTest.cs @@ -15,16 +15,6 @@ public abstract class NServiceBusTransportTest { - public static string SpecificTransport - { - get - { - var specificTransport = EnvironmentHelper.GetEnvironmentVariable("Transport.UseSpecific"); - - return !string.IsNullOrEmpty(specificTransport) ? specificTransport : MsmqDescriptorKey; - } - } - [SetUp] public void SetUp() { @@ -33,7 +23,14 @@ public void SetUp() static IConfigureTransportInfrastructure CreateConfigurer() { - var typeName = "Configure" + SpecificTransport + "Infrastructure"; + var transport = EnvironmentHelper.GetEnvironmentVariable("Transport.UseSpecific"); + + if (string.IsNullOrWhiteSpace(transport)) + { + transport = transportDefinitions.Value.FirstOrDefault(t => t.Name != MsmqDescriptorKey)?.Name ?? MsmqDescriptorKey; + } + + var typeName = $"Configure{transport}Infrastructure"; var configurerType = Type.GetType(typeName, false); @@ -48,6 +45,7 @@ static IConfigureTransportInfrastructure CreateConfigurer() { throw new InvalidOperationException($"{typeName} does not implement {typeof(IConfigureTransportInfrastructure).Name}."); } + return configurer; } @@ -208,6 +206,8 @@ static string GetTestName() static string MsmqDescriptorKey = "MsmqTransport"; static string TestIdHeaderName = "TransportTest.TestId"; + static Lazy> transportDefinitions = new Lazy>(() => TypeScanner.GetAllTypesAssignableTo().ToList()); + class FakeCriticalError : CriticalError { public FakeCriticalError(Action errorAction) : base(null) diff --git a/src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0006/TransportConfigurationResult.cs b/src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0007/TransportConfigurationResult.cs similarity index 100% rename from src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0006/TransportConfigurationResult.cs rename to src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0007/TransportConfigurationResult.cs diff --git a/src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0007/TypeScanner.cs b/src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0007/TypeScanner.cs new file mode 100644 index 000000000..6d88367c5 --- /dev/null +++ b/src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0007/TypeScanner.cs @@ -0,0 +1,40 @@ +namespace NServiceBus.TransportTests +{ + using System; + using System.Collections.Generic; + using System.Linq; + using System.Reflection; + using Hosting.Helpers; + + public class TypeScanner + { + static IEnumerable AvailableAssemblies + { + get + { + if (assemblies == null) + { + var result = new AssemblyScanner().GetScannableAssemblies(); + + assemblies = result.Assemblies.Where(a => + { + var references = a.GetReferencedAssemblies(); + + return references.All(an => an.Name != "nunit.framework"); + }).ToList(); + } + + return assemblies; + } + } + + public static IEnumerable GetAllTypesAssignableTo() + { + return AvailableAssemblies.SelectMany(a => a.GetTypes()) + .Where(t => typeof(T).IsAssignableFrom(t) && t != typeof(T)) + .ToList(); + } + + static List assemblies; + } +} diff --git a/src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0006/When_failure_happens_after_send.cs b/src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0007/When_failure_happens_after_send.cs similarity index 100% rename from src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0006/When_failure_happens_after_send.cs rename to src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0007/When_failure_happens_after_send.cs diff --git a/src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0006/When_message_is_available.cs b/src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0007/When_message_is_available.cs similarity index 100% rename from src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0006/When_message_is_available.cs rename to src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0007/When_message_is_available.cs diff --git a/src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0006/When_on_error_throws.cs b/src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0007/When_on_error_throws.cs similarity index 92% rename from src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0006/When_on_error_throws.cs rename to src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0007/When_on_error_throws.cs index 33b9547bf..dfee02831 100644 --- a/src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0006/When_on_error_throws.cs +++ b/src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0007/When_on_error_throws.cs @@ -11,7 +11,7 @@ public class When_on_error_throws : NServiceBusTransportTest [TestCase(TransportTransactionMode.ReceiveOnly)] [TestCase(TransportTransactionMode.SendsAtomicWithReceive)] [TestCase(TransportTransactionMode.TransactionScope)] - public async Task Should_reinvoke_on_error_with_orignal_exception(TransportTransactionMode transactionMode) + public async Task Should_reinvoke_on_error_with_original_exception(TransportTransactionMode transactionMode) { var onErrorCalled = new TaskCompletionSource(); diff --git a/src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0006/When_on_message_throws.cs b/src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0007/When_on_message_throws.cs similarity index 100% rename from src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0006/When_on_message_throws.cs rename to src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0007/When_on_message_throws.cs diff --git a/src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0006/When_on_message_throws_after_delayed_retry.cs b/src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0007/When_on_message_throws_after_delayed_retry.cs similarity index 100% rename from src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0006/When_on_message_throws_after_delayed_retry.cs rename to src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0007/When_on_message_throws_after_delayed_retry.cs diff --git a/src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0006/When_on_message_throws_after_immediate_retry.cs b/src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0007/When_on_message_throws_after_immediate_retry.cs similarity index 100% rename from src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0006/When_on_message_throws_after_immediate_retry.cs rename to src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0007/When_on_message_throws_after_immediate_retry.cs diff --git a/src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0006/When_requesting_immediate_retry.cs b/src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0007/When_requesting_immediate_retry.cs similarity index 100% rename from src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0006/When_requesting_immediate_retry.cs rename to src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0007/When_requesting_immediate_retry.cs diff --git a/src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0006/When_scope_dispose_throws.cs b/src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0007/When_scope_dispose_throws.cs similarity index 100% rename from src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0006/When_scope_dispose_throws.cs rename to src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0007/When_scope_dispose_throws.cs diff --git a/src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0006/When_sending_from_on_error.cs b/src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0007/When_sending_from_on_error.cs similarity index 100% rename from src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0006/When_sending_from_on_error.cs rename to src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0007/When_sending_from_on_error.cs diff --git a/src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0006/When_user_aborts_processing.cs b/src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0007/When_user_aborts_processing.cs similarity index 100% rename from src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0006/When_user_aborts_processing.cs rename to src/NServiceBus.SqlServer.TransportTests/App_Packages/NSB.TransportTests.6.0.0-beta0007/When_user_aborts_processing.cs diff --git a/src/NServiceBus.SqlServer.TransportTests/NServiceBus.SqlServer.TransportTests.csproj b/src/NServiceBus.SqlServer.TransportTests/NServiceBus.SqlServer.TransportTests.csproj index 57bec5eca..701914895 100644 --- a/src/NServiceBus.SqlServer.TransportTests/NServiceBus.SqlServer.TransportTests.csproj +++ b/src/NServiceBus.SqlServer.TransportTests/NServiceBus.SqlServer.TransportTests.csproj @@ -32,7 +32,7 @@ - ..\packages\NServiceBus.6.0.0-beta0006\lib\net452\NServiceBus.Core.dll + ..\packages\NServiceBus.6.0.0-beta0007\lib\net452\NServiceBus.Core.dll True @@ -60,19 +60,20 @@ - - - - - - - - - - - - - + + + + + + + + + + + + + + diff --git a/src/NServiceBus.SqlServer.TransportTests/packages.config b/src/NServiceBus.SqlServer.TransportTests/packages.config index ca13bbfe1..3c06c8c3f 100644 --- a/src/NServiceBus.SqlServer.TransportTests/packages.config +++ b/src/NServiceBus.SqlServer.TransportTests/packages.config @@ -1,6 +1,6 @@  - - + + \ No newline at end of file diff --git a/src/NServiceBus.SqlServer.UnitTests/NServiceBus.SqlServer.UnitTests.csproj b/src/NServiceBus.SqlServer.UnitTests/NServiceBus.SqlServer.UnitTests.csproj index dad43c9d9..4dd79ba76 100644 --- a/src/NServiceBus.SqlServer.UnitTests/NServiceBus.SqlServer.UnitTests.csproj +++ b/src/NServiceBus.SqlServer.UnitTests/NServiceBus.SqlServer.UnitTests.csproj @@ -69,7 +69,7 @@ True - ..\packages\NServiceBus.6.0.0-beta0006\lib\net452\NServiceBus.Core.dll + ..\packages\NServiceBus.6.0.0-beta0007\lib\net452\NServiceBus.Core.dll True diff --git a/src/NServiceBus.SqlServer.UnitTests/packages.config b/src/NServiceBus.SqlServer.UnitTests/packages.config index e0255c36c..31555722f 100644 --- a/src/NServiceBus.SqlServer.UnitTests/packages.config +++ b/src/NServiceBus.SqlServer.UnitTests/packages.config @@ -4,6 +4,6 @@ - + \ No newline at end of file diff --git a/src/NServiceBus.SqlServer/NServiceBus.SqlServer.csproj b/src/NServiceBus.SqlServer/NServiceBus.SqlServer.csproj index 4942f8bc2..363e13ef9 100644 --- a/src/NServiceBus.SqlServer/NServiceBus.SqlServer.csproj +++ b/src/NServiceBus.SqlServer/NServiceBus.SqlServer.csproj @@ -56,7 +56,7 @@ - ..\packages\NServiceBus.6.0.0-beta0006\lib\net452\NServiceBus.Core.dll + ..\packages\NServiceBus.6.0.0-beta0007\lib\net452\NServiceBus.Core.dll True diff --git a/src/NServiceBus.SqlServer/packages.config b/src/NServiceBus.SqlServer/packages.config index e05a3fb06..073e6fbce 100644 --- a/src/NServiceBus.SqlServer/packages.config +++ b/src/NServiceBus.SqlServer/packages.config @@ -3,7 +3,7 @@ - +