protected internal ApplicationBindingBase()
 {
     _referencedApplications = new ReferencedApplicationBindingCollection();
     _receivePorts           = new ReceivePortCollection <TNamingConvention>(this);
     _sendPorts      = new SendPortCollection <TNamingConvention>(this);
     _orchestrations = new OrchestrationBindingCollection <TNamingConvention>(this);
     Timestamp       = DateTime.Now;
 }
        public void AcceptsVisitorAndVisitReferencedApplications()
        {
            var applicationBindingMock = new Mock <ApplicationBindingBase <string> > {
                CallBase = true
            };

            var referencedApplicationBindingCollection = new ReferencedApplicationBindingCollection {
                applicationBindingMock.Object
            };

            var visitorMock = new Mock <IApplicationBindingVisitor>();

            ((IVisitable <IApplicationBindingVisitor>)referencedApplicationBindingCollection).Accept(visitorMock.Object);

            visitorMock.Verify(m => m.VisitReferencedApplicationBinding(applicationBindingMock.Object), Times.Once);
        }