예제 #1
0
        public void TestMethod1()
        {
            SimpleIoc.Default.Register <IIface>(() => new MockIIface().Object);

            IocConsumer iocConsumer = new IocConsumer();
            int         b           = iocConsumer.D(1);
        }
예제 #2
0
        public void Test1()
        {
            Buildable buildableOne = new Buildable.Builder().FromInt(1).Build();
            //Buildable buildableTwo = new Buildable(); //(Invalid, Private)
            Buildable buildableTwo   = new Buildable.Builder().Build();
            Buildable buildableThree = new Buildable.Builder().FromInt(3).Build();

            Assert.AreEqual(buildableOne.Testo, "Uno");
            Assert.IsNull(buildableThree);


            SimpleIoc.Default.Register <IIface>(() => new MockIIface().Object);

            IocConsumer iocConsumer = new IocConsumer();
            int         b           = iocConsumer.D(1);
            //Assert.AreEqual(mock.Object.Doppio(1), 2);

            //Assert.Pass();
        }