public void MethodInjectionTest() { // the object is created somewhere else OutlookEmailService_v2 outlookEmailService = new OutlookEmailService_v2(); UserLogic_Method userLogic = new UserLogic_Method(); // then the dependency is injected using the class method: userLogic.Register("email", "password", outlookEmailService); }
public void SetterInjectionTest() { // the object is created somewhere else OutlookEmailService_v2 outlookEmailService = new OutlookEmailService_v2(); // then the dependency is injected through the setter property: UserLogic_Setter userLogic = new UserLogic_Setter() { EmailService = outlookEmailService }; }
public UserLogic_Method() { _authService = new GoogleOAuthService_v1(); _emailService = new OutlookEmailService_v2(); }