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)));
 }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
 public FakeGetters(IPersonsCollection personList, IWIMTeams wimTeams) : base(personList, wimTeams)
 {
 }
Ejemplo n.º 4
0
 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));
 }