コード例 #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());
        }