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))); }
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); }
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); }
public ShowPersonActivityCommand(IGetters getter, IHistoryItemsCollection historyItemsCollection) { this.getter = getter; this.historyItemsCollection = historyItemsCollection; }
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; }
public ShowAllTeamMembersCommand(IGetters getters, IHistoryItemsCollection historyItemsCollection) { this.getters = getters ?? throw new ArgumentNullException(nameof(getters)); this.historyItemsCollection = historyItemsCollection ?? throw new ArgumentNullException(nameof(historyItemsCollection)); }
public FakeShowAllTeamBoardsCommand(IGetters getters, IHistoryItemsCollection historyItemsCollection) : base(getters, historyItemsCollection) { }
public FakeHistoryEventWriter(IHistoryItemsCollection historyItemsList, IComponentsFactory factory) : base(historyItemsList, factory) { }