Beispiel #1
0
        public void TestDisposable()
        {
            var snapshot = Blockchain.Singleton.GetSnapshot();
            var m        = new Mock <IDisposable>();
            var engine   = new ApplicationEngine(TriggerType.Application, null, snapshot, 0, true);

            engine.AddDisposable(m.Object).Should().Be(m.Object);
            Action action = () => engine.Dispose();

            action.Should().NotThrow();
        }
        public void TestDisposable()
        {
            var snapshot = Store.GetSnapshot().Clone();
            var replica  = snapshot.Clone();
            var engine   = new ApplicationEngine(TriggerType.Application, null, snapshot, 0, true);

            engine.AddDisposable(replica).Should().Be(replica);
            Action action = () => engine.Dispose();

            action.Should().NotThrow();
        }