public new void Setup() { base.Setup(); User = GetInst <UserLogic>(); Password = GetInst <IPasswordLogic>(); UserServices = GetInst <UserServicesLogic>(); SyncUser = GetInst <SynchronizeUserLogic>(); UserProfile = GetInst <IUserProfileLogic>(); Consent = GetInst <IConsentLogic>(); Otac = GetInst <OtacLogic>(); HandoverCreditCheck = GetInst <IHandoverCreditCheckLogic>(); LegacyBroadband = GetInst <ILegacyBroadbandService>(); AccessPersonalData = GetInst <IAccessPersonalDataLogic>(); dict = new Dictionary <Params, object>() { { Params.User, User }, { Params.Password, Password }, { Params.UserServices, UserServices }, { Params.SyncUser, SyncUser }, { Params.UserProfile, UserProfile }, { Params.Consent, Consent }, { Params.Otac, Otac }, { Params.HandoverCreditCheck, HandoverCreditCheck }, { Params.LegacyBroadband, LegacyBroadband }, { Params.AccessPersonalData, AccessPersonalData }, }; }
public T CreateTestControllerWith <T>( UserLogic user = null, UserServicesLogic userServices = null, SynchronizeUserLogic syncUser = null, IUserProfileLogic userProfile = null, IConsentLogic consent = null, IPasswordLogic password = null, OtacLogic otac = null, IHandoverCreditCheckLogic handoverCreditCheck = null, ILegacyBroadbandService legacyBroadband = null, IAccessPersonalDataLogic accessPersonalData = null ) where T : ApiController, new() { user = Eval <UserLogic> (Params.User, user); userServices = Eval <UserServicesLogic> (Params.UserServices, userServices); syncUser = Eval <SynchronizeUserLogic>(Params.SyncUser, syncUser); userProfile = Eval <IUserProfileLogic>(Params.UserProfile, userProfile); consent = Eval <IConsentLogic>(Params.Consent, consent); password = Eval <IPasswordLogic>(Params.Password, password); otac = Eval <OtacLogic>(Params.Otac, otac); handoverCreditCheck = Eval <IHandoverCreditCheckLogic>(Params.HandoverCreditCheck, handoverCreditCheck); legacyBroadband = Eval <ILegacyBroadbandService>(Params.LegacyBroadband, legacyBroadband); accessPersonalData = Eval <IAccessPersonalDataLogic>(Params.AccessPersonalData, accessPersonalData); var ctrl = new UserController( user, userServices, syncUser, userProfile, consent, password, otac, handoverCreditCheck, legacyBroadband, accessPersonalData ); return(ctrl as T); }