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 ShowAllTeamBoardsCommand(IGetters getters, IHistoryItemsCollection historyItemsCollection)
 {
     this.getters = getters ?? throw new ArgumentNullException(
                              string.Format(CommandsConsts.NULL_OBJECT,
                                            nameof(getters)));
     this.historyItemsCollection = historyItemsCollection ?? throw new ArgumentNullException(
                                             string.Format(CommandsConsts.NULL_OBJECT,
                                                           nameof(historyItemsCollection)));
 }
示例#3
0
        public Store Register(IGetters Value, string Key = Constraints.DefaultKey)
        {
            if (!_Getters.ContainsKey(Key))
            {
                _Getters.Add(Key, Value);
            }

            return(this);
        }
示例#4
0
        public void Throw_WhenPassedValueForGetterIsNull()
        {
            //Arrange
            IGetters getter             = null;
            var      historyEventWriter = new Mock <IHistoryEventWriter>();

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

            //Assert
            Assert.AreEqual(string.Format(CommandsConsts.NULL_OBJECT, nameof(getter)), exception.ParamName);
        }
示例#5
0
        public void Throw_When_A_Passed_Getter_Is_Null()
        {
            //Arrange
            IGetters getters = null;
            var      fakeHistoryItemsCollection = new Mock <IHistoryItemsCollection>();
            var      expectedMessage            = string.Format(CommandsConsts.NULL_OBJECT,
                                                                nameof(getters));

            //Act,Assert
            var sut = Assert.ThrowsException <ArgumentNullException>(
                () => new ShowAllTeamBoardsCommand(getters, fakeHistoryItemsCollection.Object));

            //Assert
            Assert.AreEqual(expectedMessage, sut.ParamName);
        }
 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));
 }
示例#8
0
 public FakeAddPersonToTeamCommand(IGetters getter, IHistoryEventWriter historyEventWriter) : base(getter, historyEventWriter)
 {
 }
示例#9
0
 public AssignWorkItemToMemberCommand(IHistoryEventWriter historyEventWriter, IGetters getter)
 {
     this.historyEventWriter = historyEventWriter ?? throw new ArgumentNullException(nameof(historyEventWriter));
     this.getter             = getter ?? throw new ArgumentNullException(nameof(getter));
 }
示例#10
0
 public ShowPersonActivityCommand(IGetters getter, IHistoryItemsCollection historyItemsCollection)
 {
     this.getter = getter;
     this.historyItemsCollection = historyItemsCollection;
 }
示例#11
0
 public ListBoardWorkItemsCommand(IGetters getter)
 {
     this.getter = getter;
 }
 public ShowBoardActivityCommand(IGetters getters, IHistoryItemsCollection historyItemsCollection)
 {
     this.getters = getters;
     this.historyItemsCollection = historyItemsCollection;
 }
示例#13
0
 public ShowAllTeamMembersCommand(IGetters getters, IHistoryItemsCollection historyItemsCollection)
 {
     this.getters = getters ?? throw new ArgumentNullException(nameof(getters));
     this.historyItemsCollection = historyItemsCollection ?? throw new ArgumentNullException(nameof(historyItemsCollection));
 }
示例#14
0
 public FakeShowAllTeamBoardsCommand(IGetters getters, IHistoryItemsCollection historyItemsCollection)
     : base(getters, historyItemsCollection)
 {
 }