Ejemplo n.º 1
0
        private SystemRecycledListener bootstrap(EngineMode mode)
        {
            var listener = new SystemRecycledListener(_messaging);

            copyStorytellerAssemblyIfNecessary();

            _domain = AppDomain.CreateDomain("Storyteller-SpecRunning-Domain", null, _remoteSetup.Setup);


            try
            {
                Type proxyType = typeof(RemoteProxy);
                _proxy = (RemoteProxy)_domain.CreateInstanceAndUnwrap(proxyType.Assembly.FullName, proxyType.FullName);

                _messaging.AddListener(listener);
                _proxy.Start(mode, _project, new RemoteListener(_messaging));
            }
            catch (Exception)
            {
                ConsoleWriter.Write(ConsoleColor.Yellow, "Storyteller was unable to start an AppDomain for the specification project. Check that the project has already been compiled.");

                throw;
            }



            return(listener);
        }
Ejemplo n.º 2
0
        private IListener createListener()
        {
            var listener = MockRepository.GenerateMock <IListener>();

            theHub.AddListener(listener);

            return(listener);
        }
        private IListener createListener()
        {
            var listener = Substitute.For <IListener>();

            theHub.AddListener(listener);

            return(listener);
        }
Ejemplo n.º 4
0
        public RemoteController(string path)
        {
            _remoteSetup.ServiceDirectory = path;
            _project   = Project.LoadForFolder(path);
            _path      = path;
            _messaging = new MessagingHub();

            _messaging.AddListener(this);
        }
Ejemplo n.º 5
0
            public Task <T> AndWaitFor <T>()
            {
                var watcher = new ResponseWatcher <T>(_messaging);

                _messaging.AddListener(watcher);

                _sendAction();

                return(watcher.Task);
            }
Ejemplo n.º 6
0
        public void SetUp()
        {
            theListener = new RecordingListener();
            var hub = new MessagingHub();

            hub.AddListener(theListener);

            var remoteListener = new RemoteListener(hub);

            EventAggregator.Start(remoteListener);
        }
Ejemplo n.º 7
0
        public void SetUp()
        {
            theListener = new RecordingListener();
            var hub = new MessagingHub();

            hub.AddListener(theListener);

            var remoteListener = new RemoteListener(hub);

            GlobalMessageTracking.Start(remoteListener);
        }