Exemplo n.º 1
0
        public void ResolveMultiple()
        {
            IEnumerable <ITimer> result1 = new ITimer[] { new FakeTimer(), new TimersTimer() };

            this.ServiceLocator.PredefineResult(result1, sl => sl.ResolveMultiple(typeof(ITimer)));

            IEnumerable <ITimer> result2 = this.ServiceLocator.ResolveMultiple <ITimer>();

            Assert.AreEqual(result1.Count(), result2.Count());
            Assert.AreSame(result1.First(), result2.First());
            Assert.AreSame(result1.Last(), result2.Last());
        }