コード例 #1
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)));
 }
コード例 #2
0
        public void Throw_ArgumentNullException_WhenHistoryItemsListIsNull()
        {
            //Assert var historyItemsList = new Mock<IHistoryItemsCollection>();
            IHistoryItemsCollection historyItemsList = null;
            var factoryMock = new Mock <IComponentsFactory>();
            //Act&&Assert
            var ex = Assert.ThrowsException <ArgumentNullException>(() => new HistoryEventWriter(historyItemsList, factoryMock.Object));

            Assert.AreEqual(string.Format(CommandsConsts.NULL_OBJECT, nameof(historyItemsList)), ex.ParamName);
        }
コード例 #3
0
        public void Throw_When_A_Passed_HistoryItemsCollection_Is_Null()
        {
            //Arrange
            var fakeGetters = new Mock <IGetters>();
            IHistoryItemsCollection historyItemsCollection = null;
            var expectedMessage = string.Format(CommandsConsts.NULL_OBJECT,
                                                nameof(historyItemsCollection));

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

            //Assert
            Assert.AreEqual(expectedMessage, sut.ParamName);
        }
コード例 #4
0
 public ShowPersonActivityCommand(IGetters getter, IHistoryItemsCollection historyItemsCollection)
 {
     this.getter = getter;
     this.historyItemsCollection = historyItemsCollection;
 }
コード例 #5
0
 public HistoryEventWriter(IHistoryItemsCollection historyItemsList, IComponentsFactory factory)
 {
     this.historyItemsList = historyItemsList ?? throw new ArgumentNullException(string.Format(CommandsConsts.NULL_OBJECT, nameof(historyItemsList)));
     this.factory          = factory ?? throw new ArgumentNullException(string.Format(CommandsConsts.NULL_OBJECT, nameof(factory)));
 }
 public ShowBoardActivityCommand(IGetters getters, IHistoryItemsCollection historyItemsCollection)
 {
     this.getters = getters;
     this.historyItemsCollection = historyItemsCollection;
 }
コード例 #7
0
 public ShowAllTeamMembersCommand(IGetters getters, IHistoryItemsCollection historyItemsCollection)
 {
     this.getters = getters ?? throw new ArgumentNullException(nameof(getters));
     this.historyItemsCollection = historyItemsCollection ?? throw new ArgumentNullException(nameof(historyItemsCollection));
 }
コード例 #8
0
 public FakeShowAllTeamBoardsCommand(IGetters getters, IHistoryItemsCollection historyItemsCollection)
     : base(getters, historyItemsCollection)
 {
 }
コード例 #9
0
 public FakeHistoryEventWriter(IHistoryItemsCollection historyItemsList, IComponentsFactory factory) : base(historyItemsList, factory)
 {
 }