Ejemplo n.º 1
0
        public async Task <bool> SendWithReceiverDown()
        {
            cleanDatabase();

            // Shutting it down
            theReceiver.Dispose();
            theReceiver = null;


            var item = new ItemCreated
            {
                Name = "Shoe",
                Id   = Guid.NewGuid()
            };

            await send(c => c.Send(item));

            var outgoing = loadAllOutgoingEnvelopes(theSender).SingleOrDefault();

            StoryTellerAssert.Fail(outgoing == null, "No outgoing envelopes are persisted");
            StoryTellerAssert.Fail(outgoing.MessageType != typeof(ItemCreated).ToMessageTypeName(),
                                   $"Envelope message type expected {typeof(ItemCreated).ToMessageTypeName()}, but was {outgoing.MessageType}");

            return(true);
        }
Ejemplo n.º 2
0
        public override void TearDown()
        {
            _host.Dispose();

            _graph     = null;
            _chain     = null;
            _transport = null;
            _bus       = null;
            _host      = null;
        }
Ejemplo n.º 3
0
        public override void TearDown()
        {
            _host.Dispose();

            foreach (var locker in _nodeLockers)
            {
                locker.SafeDispose();
            }

            _nodeLockers.Clear();
        }
Ejemplo n.º 4
0
        public when_shutting_down_the_host()
        {
            theRegistry.Handlers.DisableConventionalDiscovery();
            theRegistry.Services.AddSingleton <IMainService>(mainService);

            theRegistry.Services.AddTransient <IFakeStore, FakeStore>();


            theHost = JasperHost.For(theRegistry);

            theHost.Dispose();
        }
 public void Dispose()
 {
     _host?.Dispose();
 }
Ejemplo n.º 6
0
 public void Shutdown()
 {
     _host.Dispose();
     _host = null;
 }
Ejemplo n.º 7
0
 public void Dispose()
 {
     theHost?.Dispose();
 }
Ejemplo n.º 8
0
 public override void TearDown()
 {
     theHost?.Dispose();
 }
Ejemplo n.º 9
0
 public override void TearDown()
 {
     _host.Dispose();
 }
Ejemplo n.º 10
0
 public override void TearDown()
 {
     _host?.Dispose();
     _host = null;
 }
Ejemplo n.º 11
0
 public void Dispose()
 {
     _receiving.Dispose();
     _sender.Dispose();
 }
Ejemplo n.º 12
0
 public void Dispose()
 {
     theSender?.Dispose();
     theReceiver?.Dispose();
 }
Ejemplo n.º 13
0
 public override void TearDown()
 {
     theSender?.Dispose();
     theReceiver?.Dispose();
 }