public AddPersonToTeamCommand(IGetters getter, IHistoryEventWriter historyEventWriter)
 {
     this.getter = getter ?? throw new ArgumentNullException(
                             string.Format(CommandsConsts.NULL_OBJECT, nameof(getter)));
     this.historyEventWriter = historyEventWriter ?? throw new ArgumentNullException(
                                         string.Format(CommandsConsts.NULL_OBJECT, nameof(historyEventWriter)));
 }
Пример #2
0
        public void Throw_WhenPassedValueForHistoryEventWriterIsNull()
        {
            //Arrange
            var getter = new Mock <IGetters>();
            IHistoryEventWriter historyEventWriter = null;

            //Act
            var exception = Assert.ThrowsException <ArgumentNullException>(() => new AddPersonToTeamCommand(getter.Object, historyEventWriter));

            //Assert
            Assert.AreEqual(string.Format(CommandsConsts.NULL_OBJECT, nameof(historyEventWriter)), exception.ParamName);
        }
 public CreatePersonCommand(IHistoryEventWriter historyEventWriter, IPersonsCollection personList, IComponentsFactory componentsFactory)
 {
     this.historyEventWriter = historyEventWriter ?? throw new ArgumentNullException(
                                         string.Format(
                                             CommandsConsts.NULL_OBJECT,
                                             nameof(historyEventWriter)));
     this.personList = personList ?? throw new ArgumentNullException(
                                 string.Format(
                                     CommandsConsts.NULL_OBJECT,
                                     nameof(personList)));
     this.componentsFactory = componentsFactory ?? throw new ArgumentNullException(
                                        string.Format(
                                            CommandsConsts.NULL_OBJECT,
                                            nameof(componentsFactory)));
 }
 public CreateBugCommand(IHistoryEventWriter historyEventWriter, IComponentsFactory componentsFactory, IGetters getter)
 {
     this.historyEventWriter = historyEventWriter ?? throw new ArgumentNullException(nameof(historyEventWriter));
     this.componentsFactory  = componentsFactory ?? throw new ArgumentNullException(nameof(componentsFactory));
     this.getter             = getter ?? throw new ArgumentNullException(nameof(getter));
 }
 public ChangePriorityCommand(IHistoryEventWriter historyEventWriter, IGetters getter)
 {
     this.historyEventWriter = historyEventWriter ?? throw new ArgumentNullException(nameof(historyEventWriter));
     this.getter             = getter ?? throw new ArgumentNullException(nameof(getter));
 }
Пример #6
0
 public FakeAddPersonToTeamCommand(IGetters getter, IHistoryEventWriter historyEventWriter) : base(getter, historyEventWriter)
 {
 }
Пример #7
0
 public AssignWorkItemToMemberCommand(IHistoryEventWriter historyEventWriter, IGetters getter)
 {
     this.historyEventWriter = historyEventWriter ?? throw new ArgumentNullException(nameof(historyEventWriter));
     this.getter             = getter ?? throw new ArgumentNullException(nameof(getter));
 }
Пример #8
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));
 }