public void StoppingInOrder()
		{
			mock.ExpectAndReturn("GetComponentInstancesOfType",
			                     new ArrayList(new object[] {one, two, three}),
			                     new IsEqual(typeof (IStartable)));

			DefaultLifecycleManager dlm = new DefaultLifecycleManager();
			dlm.Stop(pico);

			mock.Verify();

			Assert.AreEqual("Three>Two>One>", events.ToString());
		}
		public void DisposingInOrder()
		{
			mock.ExpectAndReturn("GetComponentInstancesOfType",
			                     new ArrayList(new object[] {one, two, three}),
			                     new IsEqual(typeof (IDisposable)));


			DefaultLifecycleManager dlm = new DefaultLifecycleManager();
			dlm.Dispose(pico);

			mock.Verify();
			Assert.AreEqual("!Three!Two!One", events.ToString());
		}
Beispiel #3
0
        public void StartingInOrder()
        {
            mock.ExpectAndReturn("GetComponentInstancesOfType",
                                 new ArrayList(new object[] { one, two, three }),
                                 new IsEqual(typeof(IStartable)));

            DefaultLifecycleManager dlm = new DefaultLifecycleManager();

            dlm.Start(pico);

            mock.Verify();

            Assert.AreEqual("<One<Two<Three", events.ToString());
        }