Exemplo n.º 1
0
        public void TearDown()
        {
            var bus = Bus;

            Bus = null;

            if (bus != null)
            {
                var instanceId = bus.InstanceId;
                bus.Stop().Wait();
                bus.Dispose();

                MethodCallCounter.DestroyInstance(instanceId);
            }

            Instance?.Dispose();
            Instance = null;

            TestLoggingExtensions.LogTestResult();

            if (!_thenWasInvoked)
            {
                Assert.Fail($"Test completed without calling {nameof(Then)} method.");
            }
        }
Exemplo n.º 2
0
        public void TearDown()
        {
            var bus = Bus;

            Bus = null;

            bus?.Stop().Wait();
            bus?.Dispose();

            Instance?.Dispose();
            Instance = null;

            TestLoggingExtensions.LogTestResult();

            if (!_thenWasInvoked)
            {
                Assert.Fail($"Test completed without calling {nameof(Then)} method.");
            }
        }
Exemplo n.º 3
0
        public void TearDown()
        {
            var bus = Bus;

            Bus = null;

            if (bus != null)
            {
                var instanceId = bus.InstanceId;
                bus.Stop().Wait();
                bus.Dispose();

                MethodCallCounter.DestroyInstance(instanceId);
            }

            Instance?.Dispose();
            Instance = null;

            TestLoggingExtensions.LogTestResult();
        }
Exemplo n.º 4
0
 public virtual void TearDown()
 {
     TestLoggingExtensions.LogTestResult();
 }