예제 #1
0
        public void ReleaseInstanceThrowsIfInstanceContextIsNull()
        {
            var serviceType = typeof(string);
            var sut         = new DryIocInstanceProvider(_containerMock.Object, serviceType);

            Assert.Throws <ArgumentNullException>("instanceContext", () => sut.ReleaseInstance(null, new object()));
        }
예제 #2
0
        public void RealeaseInstanceDoesNotThrowIfCurrentScopeIsNull()
        {
            var instanceProvider = new DryIocInstanceProvider(_containerMock.Object, typeof(DryIocInstanceProviderTests));

            instanceProvider.ReleaseInstance(_instanceContext, new object());
        }