예제 #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);
        }
예제 #2
0
        public override void TearDown()
        {
            _host.Dispose();

            _graph     = null;
            _chain     = null;
            _transport = null;
            _bus       = null;
            _host      = null;
        }
예제 #3
0
        public override void TearDown()
        {
            _host.Dispose();

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

            _nodeLockers.Clear();
        }
예제 #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();
 }
예제 #6
0
 public void Shutdown()
 {
     _host.Dispose();
     _host = null;
 }
예제 #7
0
 public void Dispose()
 {
     theHost?.Dispose();
 }
예제 #8
0
 public override void TearDown()
 {
     theHost?.Dispose();
 }
예제 #9
0
 public override void TearDown()
 {
     _host.Dispose();
 }
예제 #10
0
 public override void TearDown()
 {
     _host?.Dispose();
     _host = null;
 }
예제 #11
0
 public void Dispose()
 {
     _receiving.Dispose();
     _sender.Dispose();
 }
예제 #12
0
 public void Dispose()
 {
     theSender?.Dispose();
     theReceiver?.Dispose();
 }
예제 #13
0
 public override void TearDown()
 {
     theSender?.Dispose();
     theReceiver?.Dispose();
 }