Beispiel #1
0
        public void Initialize()
        {
            var mocker = new AutoMocker();

            homeDelivery = mocker.CreateInstance <Concrete1>();
            upsDelivery  = mocker.CreateInstance <Concrete2>();
            personMock   = mocker.CreateInstance <Person>();
        }
Beispiel #2
0
 public HomeController([Dependency("Concrete1")] IShippingType homeDelivery, [Dependency("Concrete2")] IShippingType upsDelivery, IPerson person)
 {
     this.homeDelivery = homeDelivery;
     this.upsDelivery  = upsDelivery;
     this.person       = person;
 }
 public ValuesController([Dependency("Concrete1")] IShippingType shippingType)
 {
     homeDelivery = shippingType;
 }
 public ShippingController([Dependency("Concrete1")] IShippingType homeDelivery)
 {
     this.homeDelivery = homeDelivery;
 }
 public ShippingController()
 {
     homeDelivery = new Concrete1();
 }