public void TestResolveStructWithNullPermits()
        {
            var receiver = new Receiver13();

            Assert.DoesNotThrow(() => new DependencyContainer().Inject(receiver));
            Assert.AreEqual(0, receiver.TestObject);
        }
Ejemplo n.º 2
0
        public void TestResolveNullableInternal(int?testValue)
        {
            var receiver = new Receiver13();

            var testObject = new CachedNullableProvider();

            testObject.SetValue(testValue);

            var dependencies = DependencyActivator.MergeDependencies(testObject, new DependencyContainer());

            dependencies.Inject(receiver);

            Assert.AreEqual(testValue, receiver.Obj);
        }