Exemplo n.º 1
0
        public void ExistingInstanceReceivesPropertyInjection()
        {
            using (var kernel = new StandardKernel())
            {
                RequestsPropertyInjection mock = new RequestsPropertyInjection();
                kernel.Inject(mock);

                Assert.That(mock.Child, Is.Not.Null);
                Assert.That(mock.Child, Is.InstanceOfType(typeof(SimpleObject)));
            }
        }
		public void ExistingInstanceReceivesPropertyInjection()
		{
			using (var kernel = new StandardKernel())
			{
				RequestsPropertyInjection mock = new RequestsPropertyInjection();
				kernel.Inject(mock);

				Assert.That(mock.Child, Is.Not.Null);
				Assert.That(mock.Child, Is.InstanceOfType(typeof(SimpleObject)));
			}
		}