Exemple #1
0
        public void TestDispose()
        {
            var disposable    = NewMock <IDisposable>();
            var configuration = new InstanceImplementationConfiguration(new TestClassWrapperCreator(), disposable);

            Expect.Once.On(disposable).Method("Dispose");
            configuration.DisposeInstance();
        }
        public void TestDispose()
        {
            var disposableMock = GetMock <IDisposable>();
            var configuration  = new InstanceImplementationConfiguration(new TestClassWrapperCreator(), disposableMock.Object);

            disposableMock.Setup(x => x.Dispose());
            configuration.DisposeInstance();
        }
Exemple #3
0
        public void TestDisposeDoNothingIfNotDisposable()
        {
            var configuration = new InstanceImplementationConfiguration(new TestClassWrapperCreator(), new object());

            configuration.DisposeInstance();
        }