public QuestionsController(IQuestionManager questionManager, IAnswerManager answerManager, IPersonaManager personaManager, IHttpWrapper httpWrapper) { if (questionManager == null) { throw new ArgumentNullException(nameof(questionManager)); } if (answerManager == null) { throw new ArgumentNullException(nameof(answerManager)); } if (personaManager == null) { throw new ArgumentNullException(nameof(personaManager)); } if (httpWrapper == null) { throw new ArgumentNullException(nameof(httpWrapper)); } _questionManager = questionManager; _answerManager = answerManager; _personaManager = personaManager; _httpWrapper = httpWrapper; }
public HomeController(IQuestionManager questionManager, IAnswerManager answerManager, IObligationManager obligationManager, IPersonaManager personaManager) { if (questionManager == null) { throw new ArgumentNullException(nameof(questionManager)); } if (answerManager == null) { throw new ArgumentNullException(nameof(answerManager)); } if (obligationManager == null) { throw new ArgumentNullException(nameof(obligationManager)); } if (personaManager == null) { throw new ArgumentNullException(nameof(personaManager)); } _questionManager = questionManager; _answerManager = answerManager; _obligationManager = obligationManager; _personaManager = personaManager; }
/// <summary>Initializes a new instance of the <see cref="PersonasController"/> class.</summary> /// <param name="personaManager">Administra las operaciones de la entidad Persona.</param> public PersonasController(IPersonaManager personaManager) { this.personaManager = personaManager; }
public void Setup() { _fakePersonaLoader = new Mock <IPersonaLoader>(); _fakePersonaLoader.Setup(x => x.GetPersonas()).Returns(GetPersonaList()); _manager = new PersonaManager(_fakePersonaLoader.Object); }
public void ThrowsErrorOnPassingInNullObject() { // Act _manager = new PersonaManager(null); }