public Getters(IPersonsCollection personList, IWIMTeams wimTeams) { this.personList = personList ?? throw new ArgumentNullException( string.Format( CommandsConsts.NULL_OBJECT, nameof(personList))); this.wimTeams = wimTeams ?? throw new ArgumentNullException( string.Format( CommandsConsts.NULL_OBJECT, nameof(wimTeams))); }
public void ThrowArgumentNullException_WhenNullWIMTeamsIsPassed() { //Arrange var personList = new Mock <IPersonsCollection>(); IWIMTeams wimTeams = null; //Act&Assert var ex = Assert.ThrowsException <ArgumentNullException>(() => new Getters(personList.Object, null)); Assert.AreEqual(string.Format(CommandsConsts.NULL_OBJECT, nameof(wimTeams)), ex.ParamName); }
public FakeGetters(IPersonsCollection personList, IWIMTeams wimTeams) : base(personList, wimTeams) { }
public CreateTeamCommand(IHistoryEventWriter historyEventWriter, IWIMTeams wimTeams, IComponentsFactory componentsFactory) { this.historyEventWriter = historyEventWriter ?? throw new ArgumentNullException(nameof(historyEventWriter)); this.wimTeams = wimTeams ?? throw new ArgumentNullException(nameof(wimTeams)); this.componentsFactory = componentsFactory ?? throw new ArgumentNullException(nameof(componentsFactory)); }
public ShowAllTeamsCommand(IWIMTeams wIMTeams) { this.wIMTeams = wIMTeams ?? throw new ArgumentNullException(nameof(wIMTeams)); }