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))); }
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 Store Register(IGetters Value, string Key = Constraints.DefaultKey) { if (!_Getters.ContainsKey(Key)) { _Getters.Add(Key, Value); } return(this); }
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); }
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)); }
public FakeAddPersonToTeamCommand(IGetters getter, IHistoryEventWriter historyEventWriter) : base(getter, historyEventWriter) { }
public AssignWorkItemToMemberCommand(IHistoryEventWriter historyEventWriter, IGetters getter) { this.historyEventWriter = historyEventWriter ?? throw new ArgumentNullException(nameof(historyEventWriter)); this.getter = getter ?? throw new ArgumentNullException(nameof(getter)); }
public ShowPersonActivityCommand(IGetters getter, IHistoryItemsCollection historyItemsCollection) { this.getter = getter; this.historyItemsCollection = historyItemsCollection; }
public ListBoardWorkItemsCommand(IGetters getter) { this.getter = getter; }
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) { }