public void VisitReferencedApplicationBindingPropagatesVisitor()
        {
            var applicationBindingMock = new Mock <IVisitable <IApplicationBindingVisitor> >();

            var sut = new EnvironmentOverrideApplicator();

            sut.VisitReferencedApplicationBinding(applicationBindingMock.Object);

            applicationBindingMock.Verify(a => a.Accept(sut), Times.Once);
        }
        public void VisitReceivePortAppliesEnvironmentOverrides()
        {
            using (new DeploymentContextInjectionScope(targetEnvironment: "ANYWHERE"))
            {
                var receivePortMock = new Mock <IReceivePort <string> >();
                receivePortMock.As <ISupportValidation>();
                var environmentSensitiveReceivePortMock = receivePortMock.As <ISupportEnvironmentOverride>();

                var sut = new EnvironmentOverrideApplicator();
                sut.VisitReceivePort(receivePortMock.Object);

                environmentSensitiveReceivePortMock.Verify(m => m.ApplyEnvironmentOverrides("ANYWHERE"), Times.Once);
            }
        }
        public void VisitOrchestrationAppliesEnvironmentOverrides()
        {
            using (new DeploymentContextInjectionScope(targetEnvironment: "ANYWHERE"))
            {
                var orchestrationBindingMock = new Mock <IOrchestrationBinding>();
                orchestrationBindingMock.As <ISupportValidation>();
                var environmentSensitiveOrchestrationBindingMock = orchestrationBindingMock.As <ISupportEnvironmentOverride>();

                var sut = new EnvironmentOverrideApplicator();
                sut.VisitOrchestration(orchestrationBindingMock.Object);

                environmentSensitiveOrchestrationBindingMock.Verify(m => m.ApplyEnvironmentOverrides("ANYWHERE"), Times.Once);
            }
        }